pyanimeinfo.bangumitv.exceptions
BangumiTVError
- class pyanimeinfo.bangumitv.exceptions.BangumiTVError[source]
Base exception class for Bangumi.tv API related errors.
The
BangumiTVError
is the base exception class for all exceptions related to interactions with the Bangumi.tv API.
BangumiTVAPIError
- class pyanimeinfo.bangumitv.exceptions.BangumiTVAPIError(status_code: int, title: str, description: str | None = None, details: str | None = None)[source]
Exception for errors returned in JSON format from the Bangumi.tv API.
The
BangumiTVAPIError
class represents exceptions that are returned in JSON format when the HTTP response status code is in the 4xx range. It typically includes information such as the HTTP status code, title, description, and details of the error.- Parameters:
status_code (int) – The HTTP status code associated with the error.
title (str) – The title or summary of the error.
description (Optional[str]) – An optional description or additional information about the error.
details (Optional[str]) – An optional string providing further details about the error.
BangumiTVPageError
- class pyanimeinfo.bangumitv.exceptions.BangumiTVPageError(status_code: int, title: str, message: str)[source]
Exception for errors displayed on a Bangumi.tv web page.
The
BangumiTVPageError
class represents exceptions that are displayed on a Bangumi.tv web page. It typically includes information such as the HTTP status code, title, and message for the error.- Parameters:
status_code (int) – The HTTP status code associated with the error.
title (str) – The title or summary of the error.
message (str) – The detailed error message or description.