Errors API Reference

exception topgg.errors.ClientException[source]

Exception that’s thrown when an operation in the DBLClient fails.

These are usually for exceptions that happened due to user input.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception topgg.errors.Forbidden(response: ClientResponse, message: Union[dict, str])[source]

Exception that’s thrown when status code 403 occurs.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception topgg.errors.HTTPException(response: ClientResponse, message: Union[dict, str])[source]

Exception that’s thrown when an HTTP request operation fails.

response

The response of the failed HTTP request.

Type

aiohttp.ClientResponse

text

The text of the error. Could be an empty string.

Type

str

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception topgg.errors.NotFound(response: ClientResponse, message: Union[dict, str])[source]

Exception that’s thrown when status code 404 occurs.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception topgg.errors.ServerError(response: ClientResponse, message: Union[dict, str])[source]

Exception that’s thrown when Top.gg returns “Server Error” responses (status codes such as 500 and 503).

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception topgg.errors.TopGGException[source]

Base exception class for topggpy.

Ideally speaking, this could be caught to handle any exceptions thrown from this library.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception topgg.errors.Unauthorized(response: ClientResponse, message: Union[dict, str])[source]

Exception that’s thrown when status code 401 occurs.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception topgg.errors.UnauthorizedDetected[source]

Exception that’s thrown when no API Token is provided.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.