Skip to content

Commit

Permalink
use errors.Is for extractor errors (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefantds committed Dec 15, 2021
1 parent c435f38 commit 0fb40d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion request/extractor.go
Expand Up @@ -58,7 +58,7 @@ func (e MultiExtractor) ExtractToken(req *http.Request) (string, error) {
for _, extractor := range e {
if tok, err := extractor.ExtractToken(req); tok != "" {
return tok, nil
} else if err != ErrNoTokenInRequest {
} else if !errors.Is(err, ErrNoTokenInRequest) {
return "", err
}
}
Expand Down

0 comments on commit 0fb40d3

Please sign in to comment.