Skip to content

Commit

Permalink
feat(AppClient): wait for logs after an error (#327)
Browse files Browse the repository at this point in the history
  • Loading branch information
efiop authored Oct 10, 2024
1 parent 9aa6fc3 commit 4aba448
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion projects/fal/src/fal/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ def __call__(self, data):
json=data.dict() if hasattr(data, "dict") else dict(data),
timeout=self.timeout,
)
resp.raise_for_status()
try:
resp.raise_for_status()
except httpx.HTTPStatusError:
# allow logs to be printed before raising the exception
time.sleep(1)
raise
resp_dict = resp.json()

if not self.return_type:
Expand Down

0 comments on commit 4aba448

Please sign in to comment.