Adding error 503 catcher

This commit is contained in:
Marcus Andersson 2021-05-13 00:08:15 +02:00 committed by Kevin Morris
parent cdf75ced9a
commit f6744d3e39
3 changed files with 16 additions and 2 deletions

View file

@ -8,12 +8,12 @@ from starlette.middleware.sessions import SessionMiddleware
import aurweb.config
from aurweb.db import get_engine
from aurweb.routers import html, sso
from aurweb.routers import html, sso, errors
routes = set()
# Setup the FastAPI app.
app = FastAPI()
app = FastAPI(exception_handlers=errors.exceptions)
@app.on_event("startup")