Error format
Every error response contains anerror object:
Validation errors
When a request fails validation, the response also includes adetails array that pinpoints each invalid field:
Status codes
Scribe returns
404 rather than 403 when a resource belongs to another workspace, so a key can never confirm whether a resource it cannot access exists.Handle errors gracefully
- Treat any non-
2xxstatus as a failure, and readerror.typeanderror.codeto decide what to do. - For
422, surface thedetailsarray so the cause can be corrected field by field. - For
401and403, check that the key is valid and carries the scopes the endpoint requires. - For
409, resolve the conflicting state first, for example empty a folder before deleting it.