Skip to content

Commit 1bf199c

Browse files
authored
Merge pull request #1509 from vh05/dfbugs-1297
Setting noobaa account state "rejected"
2 parents 15f7a29 + dc341ee commit 1bf199c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/noobaaaccount/reconciler.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,8 @@ func (r *Reconciler) CreateNooBaaAccount() error {
353353

354354
accountInfo, err := r.NBClient.CreateAccountAPI(createAccountParams)
355355
if err != nil {
356-
return err
356+
return util.NewPersistentError("InvalidCreateAccountParams",
357+
fmt.Sprintf("%v", err.Error()))
357358
}
358359

359360
annotationValue, exists := util.GetAnnotationValue(r.NooBaaAccount.Annotations, "remote-operator")
@@ -428,7 +429,8 @@ func (r *Reconciler) UpdateNooBaaAccount() error {
428429

429430
err := r.NBClient.UpdateAccountS3Access(updateAccountS3AccessParams)
430431
if err != nil {
431-
return err
432+
return util.NewPersistentError("InvalidUpdateAccountS3AccessParams",
433+
fmt.Sprintf("%v", err.Error()))
432434
}
433435
log.Infof("✅ Successfully updated account %q", r.NooBaaAccount.Name)
434436
}

0 commit comments

Comments
 (0)