Skip to content

Commit

Permalink
remove redundant error assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
gerardsn committed Dec 5, 2024
1 parent f34f250 commit b8ba0c3
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions http/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b8ba0c3

Please sign in to comment.