fix: annotate errors with stack trace

This commit is contained in:
Roman Lytvyn 2021-06-04 15:05:23 +02:00
parent cd33789adc
commit f9bfa0a0dd

View File

@ -210,7 +210,7 @@ func (r *OAuth2ClientReconciler) registerOAuth2Client(ctx context.Context, c *hy
if updateErr := r.updateReconciliationStatusError(ctx, c, hydrav1alpha1.StatusRegistrationFailed, err); updateErr != nil { if updateErr := r.updateReconciliationStatusError(ctx, c, hydrav1alpha1.StatusRegistrationFailed, err); updateErr != nil {
return updateErr return updateErr
} }
return err return errors.WithStack(err)
} }
if credentials != nil { 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 { if updateErr := r.updateReconciliationStatusError(ctx, c, hydrav1alpha1.StatusUpdateFailed, err); updateErr != nil {
return updateErr return updateErr
} }
return err return errors.WithStack(err)
} }
if _, err := hydra.PutOAuth2Client(oauth2client.WithCredentials(credentials)); err != nil { if _, err := hydra.PutOAuth2Client(oauth2client.WithCredentials(credentials)); err != nil {