The API returns structured errors with stable codes. Branch on theDocumentation Index
Fetch the complete documentation index at: https://docs.lms.bsa.ai/llms.txt
Use this file to discover all available pages before exploring further.
code field, not the human-readable message.
Error envelope
Any non-2xx response has the following body:message is a human-readable string scoped to the partner contract
— internal LMS vocabulary (Client, globalisation codes like
error.msg.*) is rewritten or stripped before it reaches the wire.
For validation failures (invalid_argument), the body wraps a list of
field errors:
message is a JSON-encoded array of {field, error} pairs.
Status code mapping
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_argument | Malformed body, missing required field, invalid path/query param |
| 401 | unauthenticated | Missing/invalid/expired token, or non-admin subject |
| 403 | permission_denied | Token recognized but caller lacks permission for this resource |
| 404 | not_found | Resource does not exist |
| 409 | aborted | State conflict — e.g. attempting an action the resource’s current state does not allow |
| 500 | internal | Unexpected upstream failure |
| 503 | unavailable | Service is temporarily unavailable |
Retrying
| Code | Retry? |
|---|---|
unavailable | Yes, with backoff |
internal | Yes once, then surface to caller |
aborted | No — fix the request or the resource state |
invalid_argument, not_found, unauthenticated, permission_denied | No — client-side fix |

