From d4fbba8aebe81ddcf27ffb8e143e190d1ca35aa9 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sat, 5 Apr 2025 00:46:30 +0200 Subject: [PATCH] Revert labstack/echo-jwt#13 --- auth/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/auth/main.go b/auth/main.go index 6c986b46..05d05d26 100644 --- a/auth/main.go +++ b/auth/main.go @@ -32,6 +32,10 @@ func ErrorHandler(err error, c echo.Context) { if he, ok := err.(*echo.HTTPError); ok { code = he.Code message = fmt.Sprint(he.Message) + + if message == "missing or malformed jwt" { + code = http.StatusUnauthorized + } } else { c.Logger().Error(err) }