From 8905846fd3af259dc3b1001620fbea450b1c488d Mon Sep 17 00:00:00 2001 From: SUPREME Date: Sun, 31 May 2026 12:52:55 +0530 Subject: [PATCH] docs: add module-level docstring to exception_handlers module Documents the default exception handlers registered by FastAPI for HTTP exceptions, request validation errors, and WebSocket validation errors. --- fastapi/exception_handlers.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fastapi/exception_handlers.py b/fastapi/exception_handlers.py index 475dd7bdd9..7cd31f0180 100644 --- a/fastapi/exception_handlers.py +++ b/fastapi/exception_handlers.py @@ -1,3 +1,11 @@ +""" +Default exception handlers for FastAPI applications. + +Provides async handler functions for HTTP exceptions, request validation +errors, and WebSocket validation errors. These are registered automatically +when a FastAPI application is created. +""" + from fastapi.encoders import jsonable_encoder from fastapi.exceptions import RequestValidationError, WebSocketRequestValidationError from fastapi.utils import is_body_allowed_for_status_code