Skip to content

Commit

Permalink
fix: use default error url if passed url is None (#2873)
Browse files Browse the repository at this point in the history
  • Loading branch information
niross authored Nov 23, 2023
1 parent 4b3d3e2 commit c067598
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions dataworkspace/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,16 @@ async def handle(downstream_request):

params = {"message": exception.args[0]} if user_exception else {}
status = exception.args[1] if user_exception else 500
error_url = exception.args[2] if len(exception.args) > 2 else f"/error_{status}"
error_qs = exception.args[3] if len(exception.args) > 3 else {}
error_url = (
exception.args[2]
if len(exception.args) > 2 and exception.args[2] is not None
else f"/error_{status}"
)
error_qs = (
exception.args[3]
if len(exception.args) > 3 and exception.args[3] is not None
else {}
)
return await handle_http(
downstream_request,
"GET",
Expand Down

0 comments on commit c067598

Please sign in to comment.