spotifywebapipython.spotifywebapierror

@export
class SpotifyWebApiError(builtins.Exception):

Exception thrown when a Spotify Web API Regular Error occurs.

SpotifyWebApiError( status: int, message: str, methodName: str, reason: str, logsi: smartinspectpython.sisession.SISession = None)

Initializes a new instance of the class.

Arguments:
  • status (int): HTTP status code that is also returned in the response header.
    For further information, see Response Status Codes.
  • message (str): A short description of the cause of the error.
  • methodName (str): Name of the client method that executed the request.
  • reason (str): HTTP reason code for the error.
  • logsi (SISession): Trace session object that this exception will be logged to, or null to bypass trace logging.
    Default is None.
HttpReason: str

HTTP reason code for the error.

Example: Bad Request.

Message: str

A short description of the cause of the error.

Example: invalid id.

MethodName: str

The method being executed when the error occured.

Example: GetArtist.

Status: int

HTTP status code that is also returned in the response header.
For further information, see Response Status Codes.

Example: 400

def ToString(self) -> str:

Returns a UI-friendly string representation of the class.