From d9a734af943b3f72c2cb2d5a180377037254760c Mon Sep 17 00:00:00 2001 From: Sofie Van Landeghem Date: Wed, 5 Feb 2025 16:54:20 +0100 Subject: [PATCH] Remove duplicated code --- docs_src/handling_errors/tutorial004.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/docs_src/handling_errors/tutorial004.py b/docs_src/handling_errors/tutorial004.py index ee82c062c..d670fa5ba 100644 --- a/docs_src/handling_errors/tutorial004.py +++ b/docs_src/handling_errors/tutorial004.py @@ -25,11 +25,6 @@ async def validation_exception_handler(request, exc): return PlainTextResponse(str(exc), status_code=400) -@app.exception_handler(RequestValidationError) -async def validation_exception_handler(request, exc): - return PlainTextResponse(str(exc), status_code=400) - - @app.get("/items/{item_id}") async def read_item(item_id: int): if item_id == 3: