Skip to content

how to show exception traces? #780

Closed Answered by scott2b
scott2b asked this question in Q&A
Nov 9, 2022 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Ok, I see now that debug sends the stack trace as the payload to the client. So, e.g. with httpx, you can get this from the text property of the response.

And, I guess, if really needed, you can raise the exception on the server with an after_exception handler like:

async def after_exception_handler(exc: Exception, scope: "Scope", state: "State") -> None:
    raise Exception

...

app = Starlite(after_exception=after_exception_handler ....

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Goldziher
Comment options

@scott2b
Comment options

Answer selected by provinzkraut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants