The error envelope, HTTP status codes, and machine-readable error codes.
Splendor uses conventional HTTP status codes and returns a consistent error envelope. The 2xx range means success, 4xx means the request was rejected, and 5xx means a server-side or upstream problem.
Every error response has a detail field. For most errors it is a human-readable string; for validation and capacity errors it is a structured object with a stable code and a message.
{ "detail": "Dataset not found" }
Request validation errors (422) use the standard schema-validation shape, with a detail array describing each invalid field.
Capacity errors (503) are transient. They include a Retry-After header indicating how long to wait before retrying. Back off and retry rather than failing the request outright.
Branch on the code for structured errors and on the HTTP status otherwise. Treat 5xx as retryable with backoff (honoring Retry-After on 503); treat 4xx as something to fix in the request.