Exceptions
Contains all the internally defined exceptions used by the library.
- exception flightplandb.exceptions.BaseErrorHandler(status_code=None, message=None)
Base exception. The other exceptions all inherit from this one, but this exception will be raised directly if no others match the returned HTTP status code.
- status_code
Status code of the error
- message
Description of the error
- exception flightplandb.exceptions.BadRequestException(status_code=None, message=None)
An incorrect request was made to the server. Raised for an HTTP status code 400.
- status_code
Not used
- message
A verbose description of this error.
- exception flightplandb.exceptions.UnauthorizedException(status_code=None, message=None)
You are incorrectly authorised and may not make this request. Raised for an HTTP status code 401.
- status_code
Not used
- message
A verbose description of this error.
- exception flightplandb.exceptions.ForbiddenException(status_code=None, message=None)
The server refuses to fulfill this request, for instance due to insufficient authentication. Raised for an HTTP status code 403.
- status_code
Not used
- message
A verbose description of this error.
- exception flightplandb.exceptions.NotFoundException(status_code=None, message=None)
The server couldn't find a resource matching the request. Raised for an HTTP status code 404.
- status_code
Not used
- message
A verbose description of this error.
- exception flightplandb.exceptions.TooManyRequestsException(status_code=None, message=None)
Your requests limit for the server has been exceeded. Raised for an HTTP status code 429.
- status_code
Not used
- message
A verbose description of this error.
- exception flightplandb.exceptions.InternalServerException(status_code=None, message=None)
Something unspecified went wrong with the server. Raised for an HTTP status code 500.
- status_code
Not used
- message
A verbose description of this error.
- flightplandb.exceptions.status_handler(status_code, ignore_statuses=None)
Raises correct custom exception for appropriate HTTP status code.