Skip to content

Commit

Permalink
update secret error naming
Browse files Browse the repository at this point in the history
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
  • Loading branch information
ianmuchyri committed Jul 12, 2023
1 parent 915668f commit ba21556
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/errors/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ var (
// ErrScanMetadata indicates problem with metadata in db.
ErrScanMetadata = New("failed to scan metadata in db")

//ErrSecretError indicates an error with the entity secret
ErrSecretError = New("invalid entity secret")
//ErrSecretError indicates an error with the entity secret.
ErrSecretError = New("wrong secret")
)
2 changes: 1 addition & 1 deletion users/clients/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ func (svc service) UpdateClientSecret(ctx context.Context, token, oldSecret, new
return mfclients.Client{}, err
}
if _, err := svc.IssueToken(ctx, dbClient.Credentials.Identity, oldSecret); err != nil {
return mfclients.Client{}, errors.ErrSecretError
return mfclients.Client{}, err
}
newSecret, err = svc.hasher.Hash(newSecret)
if err != nil {
Expand Down

0 comments on commit ba21556

Please sign in to comment.