Error Handling
Both TypeScript and Python SDKs provide comprehensive error handling capabilities. The base error class isFathomError
for both SDKs.
Basic Error Handling
Handle Specific Status Codes
Error Classes
Primary error:FathomError
: The base class for HTTP error responses.
ConnectionError
: HTTP client was unable to make a request to a server.RequestTimeoutError
: HTTP request timed out due to an AbortSignal signal.RequestAbortedError
: HTTP request was aborted by the client.InvalidRequestError
: Any input used to create a request is invalid.UnexpectedClientError
: Unrecognised or unexpected error.
httpx.RequestError
: Base class for request errors.httpx.ConnectError
: HTTP client was unable to make a request to a server.httpx.TimeoutException
: HTTP request timed out.
FathomError
:
ResponseValidationError
: Type mismatch between the response data and the expected model structure.