Exceptions

restless.exceptions

exception restless.exceptions.BadRequest(msg=None)
msg = 'Bad request.'
status = 400
exception restless.exceptions.HttpError(msg=None)

The foundational HTTP-related error.

All other HTTP errors in restless inherit from this one.

Has a status attribute. If present, restless will use this as the status_code in the response.

Has a msg attribute. Has a reasonable default message (override-able from the constructor).

msg = 'Application Error'
status = 500
exception restless.exceptions.MethodNotAllowed(msg=None)
msg = 'The specified HTTP method is not allowed.'
status = 405
exception restless.exceptions.MethodNotImplemented(msg=None)
msg = 'The specified HTTP method is not implemented.'
status = 501
exception restless.exceptions.NotFound(msg=None)
msg = 'Resource not found.'
status = 404
exception restless.exceptions.RestlessError

A common base exception from which all other exceptions in restless inherit from.

No special attributes or behaviors.

exception restless.exceptions.Unauthorized(msg=None)
msg = 'Unauthorized.'
status = 401

Table Of Contents

Previous topic

Data

Next topic

Preparers

This Page