Skip to content

Commit

Permalink
Set custom error for ParseKeyFromURL (#21)
Browse files Browse the repository at this point in the history
Signed-off-by: s3rj1k <[email protected]>
  • Loading branch information
s3rj1k authored Jun 28, 2024
1 parent 30e46a0 commit 3b8aaeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion otp.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ type Key struct {
func ParseKeyFromURL(s string) (*Key, error) {
u, err := url.Parse(s)
if err != nil {
return nil, err
return nil, errors.New("otp: invalid otpauth URL")
}
key := &Key{
url: u,
Expand Down

0 comments on commit 3b8aaeb

Please sign in to comment.