Skip to content

Commit

Permalink
API: fix missing DP logging when ROOT_PATH is set
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidB137 authored Aug 3, 2023
1 parent 8bf78ad commit c4d8a12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dp3/api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Redefine Pydantic validation error handler to log all bad datapoints
@app.exception_handler(RequestValidationError)
async def validation_exception_handler(request, exc):
if request.url.path == DATAPOINTS_INGESTION_URL_PATH:
if request.url.path.replace(ROOT_PATH, "") == DATAPOINTS_INGESTION_URL_PATH:
# Convert body to readable form
if type(exc.body) is dict or type(exc.body) is list:
body = json.dumps(exc.body)
Expand Down

0 comments on commit c4d8a12

Please sign in to comment.