Skip to content

Commit

Permalink
Fix TypeError: exceptions must derive from BaseException (#329)
Browse files Browse the repository at this point in the history
* Fix TypeError: exceptions must derive from BaseException

* Fix WSGIAppError rewrapping

---------

Co-authored-by: Corentin ARNOULD <[email protected]>
  • Loading branch information
Koalab99 and Corentin ARNOULD authored Jan 24, 2025
1 parent a7948f6 commit 2bed155
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gabbi/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,8 @@ def _run_request(
)
except wsgi_intercept.WSGIAppError as exc:
# Extract and re-raise the wrapped exception.
raise (exc.exception_type, exc.exception_value,
exc.traceback)
raise exc.exception_type(exc.exception_value).with_traceback(
exc.traceback) from None

# Set headers and location attributes for follow on requests
self.response = response
Expand Down

0 comments on commit 2bed155

Please sign in to comment.