Skip to content

Commit

Permalink
fix: ApplicationException has no attribute 'body'
Browse files Browse the repository at this point in the history
  • Loading branch information
soofstad committed May 4, 2023
1 parent faad7e8 commit 3895685
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dm_cli/dmss.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@ def dmss_exception_wrapper(
) -> Any:
try:
return function(*args, **kwargs)
except (ApplicationException, NotFoundException, ApiException) as e:
except ApplicationException as e:
if state.debug:
console.print_exception()
exception = e.dict()
console.print(exception, style="red1")
raise typer.Exit(code=1)
except (NotFoundException, ApiException) as e:
if state.debug:
console.print_exception()
exception = json.loads(e.body)
Expand Down

0 comments on commit 3895685

Please sign in to comment.