# Exceptions

## restless.exceptions

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

exception restless.exceptions.Conflict(msg=None)
  msg = 'There was a conflict when processing the request.'
  status = 409

exception restless.exceptions.ExpectationFailed(msg=None)
  msg = 'Unable to satisfy requirements of Expect header.'
  status = 417

exception restless.exceptions.FailedDependency(msg=None)
  msg = 'Request failed due to a previous failed request.'
  status = 424

exception restless.exceptions.Forbidden(msg=None)
  msg = 'Permission denied.'
  status = 403

exception restless.exceptions.Gone(msg=None)
  msg = 'Resource removed permanently.'
  status = 410

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.IAmATeapot(msg=None)
  msg = 'This is a teapot; do not attempt to brew coffee with it.'
  status = 418

exception restless.exceptions.Locked(msg=None)
  msg = 'Resource is locked.'
  status = 423

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.NotAcceptable(msg=None)
  msg = "Unable to send content specified on the request's Accept header(s)."
  status = 406

exception restless.exceptions.NotFound(msg=None)
  msg = 'Resource not found.'
  status = 404

exception restless.exceptions.PreconditionFailed(msg=None)
  msg = 'Unable to satisfy one or more request preconditions.'
  status = 412

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.TooManyRequests(msg=None)
  msg = 'There was a conflict when processing the request.'
  status = 429

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

exception restless.exceptions.Unavailable(msg=None)
  msg = 'There was a conflict when processing the request.'
  status = 503

exception restless.exceptions.UnavailableForLegalReasons(msg=None)
  msg = 'Resource made unavailable by a legal decision.'
  status = 451

exception restless.exceptions.UnprocessableEntity(msg=None)
  msg = 'Request cannot be followed due to a semantic error.'
  status = 422

exception restless.exceptions.UnsupportedMediaType(msg=None)
  msg = 'Type of media provided on request is not supported.'
  status = 415