psnawp_api.core.psnawp_exceptions module#

Provide exception classes for the psnawp package.

exception PSNAWPAuthenticationError(response: str)[source]#

Bases: PSNAWPClientError

Exception for authentication related errors.

Initialize the exception.

exception PSNAWPBadRequestError(response: str)[source]#

Bases: PSNAWPClientError

Exception raised if bad request is made to the endpoint.

Initialize the exception.

exception PSNAWPClientError(response: str)[source]#

Bases: PSNAWPError

Exception raised if there is a problem at the client.

Initialize the exception.

exception PSNAWPError(response: str)[source]#

Bases: Exception

Base Exception for all PSNAWP Exceptions.

Initialize the exception.

__init__(response: str) None[source]#

Initialize the exception.

exception PSNAWPForbiddenError(response: str)[source]#

Bases: PSNAWPClientError

Exception for accessing an action is not allowed due to insufficient rights to a resource.

Initialize the exception.

exception PSNAWPIllegalArgumentError(response: str)[source]#

Bases: PSNAWPClientError

Exception raised if user gave wrong input to a function.

Initialize the exception.

exception PSNAWPInvalidTokenError(response: str)[source]#

Bases: PSNAWPClientError

Exception raised if user gave unparsable npsso token string.

Initialize the exception.

exception PSNAWPNotAllowedError(response: str)[source]#

Bases: PSNAWPClientError

Exception raised if resource doesn’t support this method.

Initialize the exception.

exception PSNAWPNotFoundError(response: str)[source]#

Bases: PSNAWPClientError

Exception raised if resource not found.

Initialize the exception.

exception PSNAWPServerError(response: str)[source]#

Bases: PSNAWPError

Exception raised if there is a problem at the server.

Initialize the exception.

exception PSNAWPTooManyRequestsError(response: str)[source]#

Bases: PSNAWPClientError

Exception raised if client sends too many requests.

Initialize the exception.

exception PSNAWPUnauthorizedError(response: str)[source]#

Bases: PSNAWPClientError

Exception for accessing an action is not allowed due to missing the right authorization.

Initialize the exception.