MCPcopy
hub / github.com/grpc-ecosystem/grpc-gateway / HTTPError

Function HTTPError

runtime/errors.go:80–82  ·  runtime/errors.go::HTTPError

HTTPError uses the mux-configured error handler.

(ctx context.Context, mux *ServeMux, marshaler Marshaler, w http.ResponseWriter, r *http.Request, err error)

Source from the content-addressed store, hash-verified

78
79// HTTPError uses the mux-configured error handler.
80func HTTPError(ctx context.Context, mux *ServeMux, marshaler Marshaler, w http.ResponseWriter, r *http.Request, err error) {
81 mux.errorHandler(ctx, mux, marshaler, w, r, err)
82}
83
84// HTTPStreamError uses the mux-configured stream error handler to notify error to the client without closing the connection.
85func HTTPStreamError(ctx context.Context, mux *ServeMux, marshaler Marshaler, w http.ResponseWriter, r *http.Request, err error) {

Calls

no outgoing calls

Tested by 1

TestDefaultHTTPErrorFunction · 0.74