WarMAC Errors#

All of the custom errors that are used within WarMAC.

Base Error#

exception warmac_errors.WarMACBaseError(msg: str = 'WarMAC Error.')#

Bases: Exception

Base exception thrown in WarMAC.

Generic Errors#

exception warmac_errors.CommandError#

Bases: WarMACBaseError

Thrown if subparser does not exist in warmac.SUBCMD_TO_FUNC.

Thrown if the subparser field of argparse.Namespace does not exist within the global dictionary warmac.SUBCMD_TO_FUNC.

exception warmac_errors.NoListingsFoundError#

Bases: WarMACBaseError

Thrown if no listings were found.

Thrown if no order listings are found given the set of parameters that the user gives the program.

HTTP Errors#

exception warmac_errors.WarMACHTTPError(message: str)#

Bases: WarMACBaseError

Thrown if the request experienced an error or gave a bad response.

Thrown if the request made by the user returned an HTTP Status code that was not 200.

exception warmac_errors.UnauthorizedAccessError#

Bases: WarMACHTTPError

Thrown if the user doesn’t have the correct credentials.

Thrown on HTTP status code 401, which indicates that authorization via proper user credentials is needed to access this resource.

exception warmac_errors.ForbiddenRequestError#

Bases: WarMACHTTPError

Thrown if the server refuses to authorize a request.

Thrown on HTTP status code 403, which indicates that access to the desired resource is forbidden.

exception warmac_errors.MalformedURLError#

Bases: WarMACHTTPError

Thrown if the given item does not exist.

Thrown on HTTP status code 404, which indicates that the resource in question does not exist.

exception warmac_errors.MethodNotAllowedError#

Bases: WarMACHTTPError

Thrown if the target resource doesn’t support the desired method.

Thrown on HTTP status code 405, which indicates that the server knows the method, but the target resource doesn’t support it.

exception warmac_errors.InternalServerError#

Bases: WarMACHTTPError

Thrown if the server has encountered an internal error.

Thrown on HTTP status code 500, which indicates that the server has encountered an internal error that prevents it from fulfilling the user’s request.

exception warmac_errors.UnknownError(status_code: int)#

Bases: WarMACHTTPError

Thrown if the HTTP Response Code is not covered.

Thrown if the HTTP Response Code is not covered by any other error previously stated.