ApiException#

exception ApiException(status_code, reason_phrase, body=None, exception_model=None, headers=None)#

Provides the exception to raise when the remote server returns an unsuccessful response.

For more information about the failure, inspect .status_code and .reason_phrase. If the server defines a custom exception model, .exception_model contains the deserialized response.

Parameters:
status_codeint

HTTP status code associated with the response.

reason_phrasestr

Description of the response provided by the server.

bodystr, optional

Content of the response provided by the server. The default is None.

exception_model: ModelBase, optional

The custom exception model if defined by the server. The default is None.

headersCaseInsensitiveDict, optional

Response headers provided by the server. The default is None.