From b8ba0c3c8150b151dbb12e8611b2084b57cfefcf Mon Sep 17 00:00:00 2001 From: Gerard Snaauw Date: Thu, 5 Dec 2024 14:56:39 +0100 Subject: [PATCH] remove redundant error assignment --- http/engine.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/http/engine.go b/http/engine.go index e981e4e1d..a639b231d 100644 --- a/http/engine.go +++ b/http/engine.go @@ -30,7 +30,6 @@ import ( "time" "github.com/labstack/echo/v4" - "github.com/labstack/echo/v4/middleware" "github.com/nuts-foundation/nuts-node/core" cryptoEngine "github.com/nuts-foundation/nuts-node/crypto" "github.com/nuts-foundation/nuts-node/http/client" @@ -67,11 +66,6 @@ func (h Engine) Router() core.EchoRouter { func (h *Engine) Configure(serverConfig core.ServerConfig) error { h.configureClient(serverConfig) - // Override default Echo HTTP error when bearer token is expected but not provided. - // Echo returns "Bad Request (400)" by default, but we use this for incorrect use of API parameters. - // "Unauthorized (401)" is a better fit. - middleware.ErrJWTMissing = echo.NewHTTPError(http.StatusUnauthorized, "missing or malformed jwt") - // We have 2 HTTP interfaces: internal and public // The following paths (and their subpaths) are bound to the internal interface: // - /internal