Errors and limits
What each error means, and how many calls a key can make.
Errors
When a call fails, the HTTP API answers a status and a body with a code and a message:
The SDKs raise one error type for all of these: BasementGatewayError in TypeScript and ApiError in Python. Both carry the status and the body.
An item that the key cannot use reads as not found. For example, reading a file in a folder that the key cannot reach answers 400 with “File not found”.
Limits
Above the limit of calls, the Gateway answers 429 until the minute ends. The SDKs try again by themselves, up to 2 more times.
Through MCP
An agent gets the same refusals as a JSON-RPC error, with the same message. A tool that the key’s access level does not allow is not in the agent’s list of tools.