From f9bfa0a0ddb108cd312bcc127a84bda1bd82c635 Mon Sep 17 00:00:00 2001 From: Roman Lytvyn Date: Fri, 4 Jun 2021 15:05:23 +0200 Subject: [PATCH] fix: annotate errors with stack trace --- controllers/oauth2client_controller.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/oauth2client_controller.go b/controllers/oauth2client_controller.go index 751cf0b..623f420 100644 --- a/controllers/oauth2client_controller.go +++ b/controllers/oauth2client_controller.go @@ -210,7 +210,7 @@ func (r *OAuth2ClientReconciler) registerOAuth2Client(ctx context.Context, c *hy if updateErr := r.updateReconciliationStatusError(ctx, c, hydrav1alpha1.StatusRegistrationFailed, err); updateErr != nil { return updateErr } - return err + return errors.WithStack(err) } if credentials != nil { @@ -270,7 +270,7 @@ func (r *OAuth2ClientReconciler) updateRegisteredOAuth2Client(ctx context.Contex if updateErr := r.updateReconciliationStatusError(ctx, c, hydrav1alpha1.StatusUpdateFailed, err); updateErr != nil { return updateErr } - return err + return errors.WithStack(err) } if _, err := hydra.PutOAuth2Client(oauth2client.WithCredentials(credentials)); err != nil {