Skip to content

Commit

Permalink
fix: return original error if no reconciliation update error
Browse files Browse the repository at this point in the history
  • Loading branch information
romanlytvyn committed Jun 4, 2021
1 parent 9f58744 commit cd33789
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 nil
return 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 nil
return err
}

if _, err := hydra.PutOAuth2Client(oauth2client.WithCredentials(credentials)); err != nil {
Expand Down

0 comments on commit cd33789

Please sign in to comment.