Exceptions¶
Exceptions raised by this library.
All exceptions inherit from JustWatchError for easier catching.
Specific exceptions are raised for HTTP-related errors and GraphQL API response errors.
| CLASS | DESCRIPTION |
|---|---|
JustWatchApiError |
Raised when JustWatch API returned errors in JSON response. |
JustWatchError |
Common parent for all exceptions raised by this library. |
JustWatchHttpError |
Raised when HTTP-related error occurs. |
JustWatchApiError
¶
Bases: JustWatchError
Raised when JustWatch API returned errors in JSON response.
If this error is raised, then no HTTP-related error occurred, but there are
listed errors in the internal JSON response. It can happen for too high complexity
of request, invalid node ID in functions like details, or invalid country or language codes.
| ATTRIBUTE | DESCRIPTION |
|---|---|
errors |
List of all errors in the JSON response from the API.
The |
Source code in src/simplejustwatchapi/exceptions.py
JustWatchHttpError
¶
Bases: JustWatchError
Raised when HTTP-related error occurs.
This is a general exception for any HTTP-related errors, such as non-2xx status
codes, network errors, timeouts, etc.
| ATTRIBUTE | DESCRIPTION |
|---|---|
msg |
Error message describing the HTTP error.
TYPE:
|
response |
Optional text of the HTTP response, if available. Usucally contains JSON with error responses from the API.
TYPE:
|