Source code for psnawp_api.core.psnawp_exceptions

[docs]class PSNAWPException(Exception): """Base Exception for all PSNAWP Exceptions."""
[docs]class PSNAWPAuthenticationError(PSNAWPException): """Exception for authentication related errors."""
[docs]class PSNAWPBadRequest(PSNAWPException): """Exception raised if bad request is made to the endpoint."""
[docs]class PSNAWPIllegalArgumentError(PSNAWPException): """Exception raised if user gave wrong input to a function."""
[docs]class PSNAWPUnauthorized(PSNAWPException): """Exception for accessing an action is not allowed due to missing the right authorization."""
[docs]class PSNAWPForbidden(PSNAWPException): """Exception for accessing an action is not allowed due to insufficient rights to a resource."""
[docs]class PSNAWPNotFound(PSNAWPException): """Exception raised if resource not found."""
[docs]class PSNAWPNotAllowed(PSNAWPException): """Exception raised if resource doesn't support this method."""
[docs]class PSNAWPServerError(PSNAWPException): """Exception raised if there is a problem at the server."""