Browse Source

📝 Update default error response in SQL tutorial

pull/138/head
Sebastián Ramírez 6 years ago
parent
commit
37e0306517
  1. 2
      docs/src/sql_databases/tutorial001.py

2
docs/src/sql_databases/tutorial001.py

@ -67,7 +67,7 @@ def read_user(user_id: int, db: Session = Depends(get_db)):
@app.middleware("http")
async def db_session_middleware(request: Request, call_next):
response = Response('', status_code=500)
response = Response("Internal server error", status_code=500)
try:
request.state.db = SessionLocal()
response = await call_next(request)

Loading…
Cancel
Save