Skip to main content

Module error

Module error 

Source
Expand description

HTTP error type — one JSON error envelope, mapped from Brain’s taxonomy.

A 5xx body deliberately carries no internal detail. BrainError renders frame-codec faults, protocol violations and version mismatches into their Display text, and forwarding that to an HTTP caller tells them about the edge’s conversation with its database rather than about their request. The detail is logged with the request id instead, so an operator can still find it — see ApiError::log_internal.

Structs§

ApiError
A structured API error. Serializes to { "error": { code, message } } with the matching HTTP status.