Skip to content

Commit

Permalink
fix: wrap original fetch key error
Browse files Browse the repository at this point in the history
  • Loading branch information
eliobischof committed Mar 2, 2021
1 parent 5380364 commit f2f509a
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 f2f509a

Please sign in to comment.