skytracker.utils.error.Errors#

class skytracker.utils.error.Errors#

Bases: object

Possible error responses

Properties

bad_request

bad request (400)

internal_server_error

internal server error (500)

not_found

not found (404)

too_many_requests

too many requests (429)

unauthorized

unauthorized (401)

Methods

combine

Combine multiple errors by name

__init__()#
classmethod combine(*names: Literal['bad_request', 'unauthorized', 'not_found', 'too_many_requests', 'internal_server_error']) dict#

Combine multiple errors by name

Returns:

combined errors

Return type:

dict

bad_request: dict = {400: {'content': {'application/json': {'example': {'detail': 'information'}}}, 'description': 'Bad request. Server will not process this request due to something that is perceived to be a client error.'}}#

bad request (400)

Type:

dict

internal_server_error: dict = {500: {'content': {'application/json': {'example': {'detail': 'information'}}}, 'description': 'Internal server error. Something went wrong while processing the request'}}#

internal server error (500)

Type:

dict

not_found: dict = {404: {'content': {'application/json': {'example': {'detail': 'information'}}}, 'description': 'Not found. The requested resource could not be found.'}}#

not found (404)

Type:

dict

too_many_requests: dict = {429: {'content': {'application/json': {'example': {'detail': 'information'}}}, 'description': 'Too many requests. The user has sent too many requests in a short time'}}#

too many requests (429)

Type:

dict

unauthorized: dict = {401: {'content': {'application/json': {'example': {'detail': 'information'}}}, 'description': 'Unauthorized. The client has not been authenticated.'}}#

unauthorized (401)

Type:

dict