Exceptions¶
All SDK exceptions inherit from ChatwootError. The exception hierarchy maps directly to HTTP status codes so you can catch as broadly or narrowly as needed.
ChatwootError
└── ChatwootAPIError
├── ChatwootAuthError (401)
├── ChatwootPermissionError (403)
├── ChatwootNotFoundError (404)
└── ChatwootValidationError (400/422)
exceptions ¶
Custom exceptions for the Chatwoot SDK.
ChatwootError ¶
Bases: Exception
Base exception for all Chatwoot SDK errors.
ChatwootAPIError ¶
Bases: ChatwootError
API returned an error response.
Initialize API error.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
status_code
|
int
|
HTTP status code |
required |
description
|
str
|
Error description from API |
required |
errors
|
list[dict] | None
|
List of detailed error objects with field, message, code |
None
|