Skip to content

Commit

Permalink
Print URL when fetch fails
Browse files Browse the repository at this point in the history
  • Loading branch information
amh4r committed Sep 6, 2024
1 parent 0f423fa commit f4c4312
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions inngest/_internal/net.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ async def fetch_with_auth_fallback(

return res
except Exception as err:
return err
new_err = Exception(f"Failed request to {request.url}: {err}")
new_err.__cause__ = err
return new_err


def fetch_with_auth_fallback_sync(
Expand Down Expand Up @@ -193,7 +195,9 @@ def fetch_with_auth_fallback_sync(
res = client.send(request)
return res
except Exception as err:
return err
new_err = Exception(f"Failed request to {request.url}: {err}")
new_err.__cause__ = err
return new_err


def normalize_headers(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "inngest"
version = "0.4.13a0"
version = "0.4.13a1"
description = "Python SDK for Inngest"
readme = "README.md"
classifiers = [
Expand Down

0 comments on commit f4c4312

Please sign in to comment.