From c4b3e01b79bc50f882c6774d66f1e3d3bf88f52d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Wed, 15 Apr 2026 17:19:53 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Auto=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/tutorial/handling-errors.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/en/docs/tutorial/handling-errors.md b/docs/en/docs/tutorial/handling-errors.md index e02b8fabb1..aac2bdbeac 100644 --- a/docs/en/docs/tutorial/handling-errors.md +++ b/docs/en/docs/tutorial/handling-errors.md @@ -243,7 +243,7 @@ If you want to use the exception along with the same default exception handlers In this example you are just printing the error with a very expressive message, but you get the idea. You can use the exception and then just reuse the default exception handlers. -### Validating Path Parameters +### Validating Path Parameters { #validating-path-parameters } FastAPI allows you to validate path parameters using Pydantic validators, similar to query parameter validation. @@ -267,5 +267,5 @@ ValidID = Annotated[str, AfterValidator(check_valid_id)] def read_item(item_id: ValidID): return {"item_id": item_id} ``` -This approach ensures validation happens before the request reaches your path operation function, -keeping your code clean and consistent. \ No newline at end of file +This approach ensures validation happens before the request reaches your path operation function, +keeping your code clean and consistent.