MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / errorEnvelopeResponse

Method errorEnvelopeResponse

internal/httpapi/outbound.go:37–40  ·  view source on GitHub ↗

errorEnvelopeResponse is the generic `default` error response (ErrorEnvelope). Huma auto-adds it to every operation, but declaring a custom `Responses` map SUPPRESSES that auto default — so any op with a custom map must re-add this, or its OpenAPI contract omits the error shape and generated clients

()

Source from the content-addressed store, hash-verified

35// its OpenAPI contract omits the error shape and generated clients fall back to
36// raw-string error bodies (losing the machine `code`; api-v1-redesign §6a #4).
37func (s *Server) errorEnvelopeResponse() *huma.Response {
38 return s.jsonResponse(reflect.TypeOf(ErrorEnvelope{}), "ErrorEnvelope",
39 "Error — the standard envelope; branch on error.code.")
40}
41
42// SendResultView is the single outbound result for send/reply/forward/approve/
43// test (MSG-9). Per scenario:

Callers 2

registerOutboundMethod · 0.95
registerDomainsMethod · 0.95

Calls 1

jsonResponseMethod · 0.95

Tested by

no test coverage detected