From d163af4d15080d69840fa158227d66fbaf6a2eb0 Mon Sep 17 00:00:00 2001 From: Denis Mishin Date: Wed, 23 Apr 2025 22:15:58 -0400 Subject: [PATCH] default err code --- internal/mcp/handler_authorization.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/mcp/handler_authorization.go b/internal/mcp/handler_authorization.go index 12696032b..292930432 100644 --- a/internal/mcp/handler_authorization.go +++ b/internal/mcp/handler_authorization.go @@ -40,7 +40,7 @@ func (srv *Handler) Authorize(w http.ResponseWriter, r *http.Request) { if err := oauth21.ValidateAuthorizationRequest(client, v); err != nil { log.Ctx(ctx).Error().Err(err).Msg("failed to validate authorization request") - var ve oauth21.Error + ve := oauth21.Error{Code: oauth21.InvalidRequest} _ = errors.As(err, &ve) oauth21.ErrorResponse(w, http.StatusBadRequest, ve.Code) return