The Error object
The one envelope every non-2xx response carries.
Every error - a validation failure, a missing product, a refused key, a crash - leaves the API as
the same envelope. Branch on error.code and the HTTP status, never on the message.
ErrorEnvelope
Not a model in either SDK: both raise it as a typed ViewriumError subclass carrying status, code, message and details.
The body of every error response (any non-2xx status).
The error.
ErrorDetail
Not a model in either SDK: both raise it as a typed ViewriumError subclass carrying status, code, message and details.
What went wrong: a machine-readable code, a human-readable message, and optional structured details.
codestringrequiredMachine-readable error code, e.g. validation_error, not_found, forbidden, conflict, payment_required, quota_exceeded, upstream_error, internal_error. Branch on this, not on the message.
messagestringrequiredHuman-readable explanation. Its wording may change.
detailsmap of string to anyoptionalnullableStructured context, when the error has any. A validation_error lists each failure under errors as {type, loc, msg}; other codes may carry a reason.