Chirp exception hierarchy.
Shared across Router, App, handler, and middleware so every module raises and catches the same types.
errors
| Name | Type | Default | Description |
|---|---|---|---|
type
|
|
— | |
qualified_name
|
|
— | |
element_type
|
|
— | |
description
|
|
— | |
source_file
|
|
— | |
line_number
|
|
— | |
is_autodoc
|
|
— | |
autodoc_element
|
|
— | |
_autodoc_template
|
|
— | |
_autodoc_url_path
|
|
— | |
_autodoc_page_type
|
|
— | |
title
|
|
— | |
doc_content_hash
|
|
— |
Symbols on this page
Base for all chirp-specific errors.
Raised when app configuration is invalid.
Typically caught duringApp._freeze()at startup.
A named template block does not exist in the target template.
Raised at render time when a region update (OOB fragment, Suspense deferred block,…
An error that maps directly to an HTTP status code.
Raised by the router, middleware, or handlers. The ASGI handler catches these and dispatches…
404 — no route matched the request path.
405 — route exists but not for this HTTP method.
Includes anAllowheader listing the valid methods and embeds the allowed methods in…
413 — request body or multipart upload exceeds a configured limit.
Raised at the byte boundary (Request.body/Request.stream) when a body…
Auth denial raised from a tool handler (401/403).
Mutable counterpart toHTTPErrorfor the MCP tool path:
frozenHTTPError cannot accept __traceback__assignment inside
…
ChirpError
class
Base for all chirp-specific errors.
ConfigurationError
class
Raised when app configuration is invalid.
Typically caught duringApp._freeze()at startup.
BlockNotFoundError
class
A named template block does not exist in the target template.
Raised at render time when a region update (OOB fragment, Suspense
deferred block, layout contract entry) references a block the
template does not define. App-levelregister_oob_region(..., optional=True)
is the opt-out for shell regions that may legitimately be absent
from some layouts; non-optional misses reach here and propagate
so they're visible rather than silently producing empty swaps.
Multi-inherits fromKeyError so existing except KeyErrorhandlers
(including Kida's documentedrender_blockcontract) still catch it.
HTTPError
class
An error that maps directly to an HTTP status code.
Raised by the router, middleware, or handlers. The ASGI handler
catches these and dispatches to the matching@app.error()handler.
NotFound
class
404 — no route matched the request path.
MethodNotAllowed
class
405 — route exists but not for this HTTP method.
Includes anAllowheader listing the valid methods and embeds
the allowed methods in the detail string for developer visibility.
PayloadTooLarge
class
413 — request body or multipart upload exceeds a configured limit.
Raised at the byte boundary (Request.body/Request.stream) when a
body of any content type exceeds the generalAppConfig.max_request_body_size
cap, and by the multipart parser when a submission exceeds the multipart-
specificAppConfig.max_upload_size(total part bytes) or
AppConfig.max_upload_parts(part count). Surfacing this before the whole
body is joined into RAM is what keeps a multi-GB upload or a multipart bomb
from OOMing the worker.
ToolAuthError
class
Auth denial raised from a tool handler (401/403).
Mutable counterpart toHTTPErrorfor the MCP tool path:
frozenHTTPError cannot accept __traceback__assignment inside
trace_span / contextlib, so skill (and similar) gates catch the
sharedenforce_auth HTTPErrorand re-raise this type. MCP
tools/callmaps it to a JSON-RPC error.
View source · /home/runner/work/chirp/chirp/site/../src/chirp/errors.py:1