Source code for asgi_tools.errors

# Copyright (c) 2020 Kirill Klenov

from __future__ import annotations


[docs] class ASGIError(Exception): """Base class for ASGI-Tools Errors."""
[docs] class ASGIConnectionClosedError(ASGIError): """ASGI-Tools connection closed error."""
[docs] class ASGIRequestEntityTooLargeError(ASGIError): """Raised when a request body exceeds the allowed size."""
[docs] class ASGIDecodeError(ASGIError, ValueError): """ASGI-Tools decoding error."""
[docs] class ASGINotFoundError(ASGIError): """Raise when http handler not found."""
[docs] class ASGIInvalidMethodError(ASGIError): """Raise when http method not found."""
[docs] class ASGIInvalidMessageError(ASGIError): """Raise when unexpected message received."""