mirror of
https://github.com/rjNemo/fastapi
synced 2026-06-12 13:36:41 +00:00
🐛 Un-hide inner HTTPException errors
This commit is contained in:
parent
6f68666e0e
commit
9458d699cb
2 changed files with 1 additions and 5 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
"""FastAPI framework, high performance, easy to learn, fast to code, ready for production"""
|
"""FastAPI framework, high performance, easy to learn, fast to code, ready for production"""
|
||||||
|
|
||||||
__version__ = "0.1.6"
|
__version__ = "0.1.7"
|
||||||
|
|
||||||
from .applications import FastAPI
|
from .applications import FastAPI
|
||||||
from .routing import APIRouter
|
from .routing import APIRouter
|
||||||
|
|
|
||||||
|
|
@ -66,13 +66,9 @@ def get_app(
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=400, detail="There was an error parsing the body"
|
status_code=400, detail="There was an error parsing the body"
|
||||||
)
|
)
|
||||||
try:
|
|
||||||
values, errors = await solve_dependencies(
|
values, errors = await solve_dependencies(
|
||||||
request=request, dependant=dependant, body=body
|
request=request, dependant=dependant, body=body
|
||||||
)
|
)
|
||||||
except Exception as e:
|
|
||||||
logging.error("Error solving dependencies", e)
|
|
||||||
raise HTTPException(status_code=400, detail="Error processing request")
|
|
||||||
if errors:
|
if errors:
|
||||||
errors_out = ValidationError(errors)
|
errors_out = ValidationError(errors)
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue