Skip to content

Instantly share code, notes, and snippets.

@Montgoner
Created February 19, 2021 17:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Montgoner/d3954e0ec32b337949015f1e4b158fb6 to your computer and use it in GitHub Desktop.
Save Montgoner/d3954e0ec32b337949015f1e4b158fb6 to your computer and use it in GitHub Desktop.
app = FastAPI(
title="My Item App”,
exception_handlers={
500: internal_error_exception_handler, # Uncontrolled internal server errors (e.g. raised by FastAPI's middlewares)
RequestValidationError: request_validation_exception_handler, # Custom data validation error
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment