# -*- coding: utf-8 -*-

"""
One notable (if incremental) improvement over Werkzeug's error system
is that 400-level requests share a common base class
(BadRequest). Same goes for do 500-coded requests
(InternalServerError).
"""

from werkzeug.wrappers import BaseResponse


class HTTPException(BaseResponse, Exception):
    code = None
    description = ''


class BadRequest(HTTPException):
    code = 400


class Unauthorized(BadRequest):
    code = 401


class PaymentRequired(BadRequest):
    "HTTP cares about your paywall."
    code = 402


class Forbidden(BadRequest):
    code = 403


class NotFound(BadRequest):
    code = 404


class MethodNotAllowed(BadRequest):
    code = 405


class NotAcceptable(BadRequest):
    code = 406


class ProxyAuthenticationRequired(BadRequest):
    code = 407


class RequestTimeout(BadRequest):
    code = 408


class Conflict(BadRequest):
    code = 409


class Gone(BadRequest):
    code = 410


class InternalServerError(HTTPException):
    code = 500


class NotImplemented(InternalServerError):
    code = 501


class BadGateway(InternalServerError):
    code = 502


class ServiceUnavailable(InternalServerError):
    code = 503


class GatewayTimeout(InternalServerError):
    code = 504


class HTTPVersionNotSupported(InternalServerError):
    code = 505

@@ -932,24 +932,518 @@
 ode = 410%0A%0A%0A
+class LengthRequired(BadRequest):%0A    code = 411%0A%0A%0Aclass PreconditionFailed(BadRequest):%0A    code = 412%0A%0A%0Aclass RequestEntityTooLarge(BadRequest):%0A    %22more like ErrorNameTooLong, amirite?%22%0A    code = 413%0A%0A%0Aclass RequestURITooLong(BadRequest):%0A    %22... shit.%22%0A    code = 414%0A%0A%0Aclass UnsupportedMediaType(BadRequest):%0A    code = 415%0A%0A%0Aclass RequestedRangeNotSatisfiable(BadRequest):%0A    code = 416%0A%0A%0Aclass ExpectationFailed(BadRequest):%0A    %22Can't. always. get. what you want.%22%0A    code = 417%0A%0A%0A
 class Intern

add the rest of those 400s why not