Exception Hierarchy
All SDK exceptions inherit fromMemoryAPIError:
Usage
Exception Reference
| Exception | HTTP Status | When Raised |
|---|---|---|
MemoryAPIError | Any | Base class for all API errors. Catch this for generic error handling. |
AuthorizationError | 401, 403 | Missing or invalid API key. |
PolicyDeniedError | 403 | The request’s policy denied access to the requested data. |
NotFoundError | 404 | The requested resource (artifact, receipt, workspace) does not exist. |
RateLimitError | 429 | Rate limit exceeded for the current plan tier. |
Exception Properties
All exceptions expose:| Property | Type | Description |
|---|---|---|
status_code | int | HTTP status code |
detail | str | Human-readable error message |
Handling Abstention
Abstention is not an error — it is a normal response when evidence is insufficient. Checkabstain_flag instead of catching exceptions: