Skip to content

Commit

Permalink
Merge pull request #87 from caos/wrap-original-error
Browse files Browse the repository at this point in the history
fix: wrap original fetch key error
  • Loading branch information
eliobischof committed Mar 2, 2021
2 parents 5380364 + f2f509a commit 527dd7b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/op/verifier_jwt_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package op
import (
"context"
"errors"
"fmt"
"time"

"gopkg.in/square/go-jose.v2"
Expand Down Expand Up @@ -91,7 +92,7 @@ func (k *jwtProfileKeySet) VerifySignature(ctx context.Context, jws *jose.JSONWe
}
key, err := k.Storage.GetKeyByIDAndUserID(ctx, keyID, k.userID)
if err != nil {
return nil, errors.New("error fetching keys")
return nil, fmt.Errorf("error fetching keys: %w", err)
}
payload, err, ok := oidc.CheckKey(keyID, jws, *key)
if !ok {
Expand Down

0 comments on commit 527dd7b

Please sign in to comment.