Skip to content

Commit

Permalink
fix: annotate errors with stack trace
Browse files Browse the repository at this point in the history
  • Loading branch information
romanlytvyn committed Jun 4, 2021
1 parent cd33789 commit f9bfa0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/oauth2client_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit f9bfa0a

Please sign in to comment.