Browse Source

Remove duplicated code

pull/13037/head
Sofie Van Landeghem 2 months ago
committed by GitHub
parent
commit
d9a734af94
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      docs_src/handling_errors/tutorial004.py

5
docs_src/handling_errors/tutorial004.py

@ -25,11 +25,6 @@ async def validation_exception_handler(request, exc):
return PlainTextResponse(str(exc), status_code=400) 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}") @app.get("/items/{item_id}")
async def read_item(item_id: int): async def read_item(item_id: int):
if item_id == 3: if item_id == 3:

Loading…
Cancel
Save