MCPcopy
hub / github.com/dunglas/mercure / httpAuthorizationError

Method httpAuthorizationError

authorization.go:203–210  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request, err error)

Source from the content-addressed store, hash-verified

201}
202
203func (h *Hub) httpAuthorizationError(w http.ResponseWriter, r *http.Request, err error) {
204 http.Error(w, http.StatusText(http.StatusUnauthorized), http.StatusUnauthorized)
205
206 ctx := r.Context()
207 if h.logger.Enabled(ctx, slog.LevelDebug) {
208 h.logger.LogAttrs(ctx, slog.LevelDebug, "Topic selectors not matched, not provided or authorization error", slog.Any("error", err))
209 }
210}

Callers 2

initSubscriptionMethod · 0.95
PublishHandlerMethod · 0.95

Calls 2

ErrorMethod · 0.80
EnabledMethod · 0.80

Tested by

no test coverage detected