Exceptions

Exception Hierarchy

Exception Classes

class fortnite_api.FortniteAPIException

The base for all Fortnite API exceptions.

This class inherits from Exception.

message

The error message describing the exception.

Type:

str

class fortnite_api.HTTPException(message, response, data, /)

Represents a base HTTP Exception. Every HTTP exception inherits from this class.

message

The error message describing the exception, if any.

Type:

Optional[str]

response

The response that was returned from the API. If the client is running async, it will be an aiohttp response, otherwise it will be a requests response.

Type:

Union[aiohttp.ClientResponse, requests.Response]

data

The raw data that was returned from the API.

Type:

Any

property status_code

Returns the status code of the response.

Returns:

The status code of the response.

Return type:

int

class fortnite_api.NotFound(message, response, data, /)

Exception raised when a resource is not found.

This class inherits from fortnite_api.HTTPException.

class fortnite_api.Forbidden(message, response, data, /)

Exception raised when the requested operation is forbidden.

This class inherits from fortnite_api.HTTPException.

class fortnite_api.ServiceUnavailable(message, response, data, /)

Exception raised when the services of Fortnite API are unavailable.

This class inherits from fortnite_api.HTTPException.

class fortnite_api.RateLimited(message, response, data, /)

Exception raised when the client has been rate limited.

This class inherits from fortnite_api.HTTPException.

class fortnite_api.Unauthorized(message, response, data, /)

Exception raised when the client is unauthorized to access the requested resource.

This class inherits from fortnite_api.HTTPException.

class fortnite_api.BetaAccessNotEnabled
Attributes

Exception raised when a user tries to access a feature or functionality that requires beta access, but the beta access is not enabled.

This class inherits fortnite_api.FortniteAPIException.

message

The error message describing the exception.

Type:

str

class fortnite_api.BetaUnknownException(*, original)
Attributes

Exception raised when an unknown exception occurs while trying to access a beta feature.

This class inherits fortnite_api.FortniteAPIException.

message

The error message describing the exception.

Type:

str

original

The original exception that occurred.

Type:

Exception

class fortnite_api.MissingAPIKey
Attributes

Exception raised when the client does not have an API key set.

This class inherits fortnite_api.FortniteAPIException.

message

The error message describing the exception.

Type:

str