Skip to main content

Module error

Module error 

Source
Expand description

Errors, in the shape the protocol requires.

UHP does not accept a bare string or a foreign envelope: a failure is {"error": {"type", "code", "message"}}, where type is one of six categories and code is machine-readable. Clients branch on code, so an unknown harness must say harness_not_found and nothing else.

message is written for a human and MUST NOT leak internals — the conformance suite greps it for Traceback, File "/ and stack-frame markers, and a server that formats a Debug error into it fails.

Structs§

ErrorEnvelope
The wire envelope: an error is always nested under error.
UhpError
The body of a UHP failure.
UhpFailure
A UHP failure together with the status it answers with.

Enums§

ErrorType
The six error categories the specification enumerates.