From 0fb40d3824233b83e0d41a8713fb38a45901540d Mon Sep 17 00:00:00 2001 From: Stefan Tudose Date: Wed, 15 Dec 2021 12:50:05 +0100 Subject: [PATCH] use errors.Is for extractor errors (#141) --- request/extractor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/request/extractor.go b/request/extractor.go index b297b8a..1dbc59a 100644 --- a/request/extractor.go +++ b/request/extractor.go @@ -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 } }