Skip to content

Commit

Permalink
fix(fal): show cause in cli
Browse files Browse the repository at this point in the history
  • Loading branch information
efiop committed Apr 23, 2024
1 parent fdc7b49 commit cec5c1d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion projects/fal/src/fal/exceptions/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ def should_handle(self, _: Exception) -> bool:
return True

def handle(self, exception: ExceptionType):
console.print(str(exception))
cause = exception.__cause__
if cause is None:
console.print(str(exception))
else:
console.print(f"{str(exception)}: {str(cause)}")


class FalServerlessExceptionHandler(BaseExceptionHandler[FalServerlessException]):
Expand Down

0 comments on commit cec5c1d

Please sign in to comment.