Replies: 4 comments 1 reply
-
Hey, @jkieboom. Have you inspected that 500 response in the network? It contains a JSON response body that includes a full stack of the caught error. Do you wish for it to also be printed into the console? |
Beta Was this translation helpful? Give feedback.
-
Yes, the issue in my case is that my network requests go through a secondary library that transforms 500 responses into thrown errors but it doesn't know about special response payloads. So it would be helpful if it would also be printed. |
Beta Was this translation helpful? Give feedback.
-
I don't mind giving this a try. @jkieboom, would you have a chance to open a pull request? |
Beta Was this translation helpful? Give feedback.
-
Scope
Improves an existing behavior
Compatibility
Feature description
It is nice that msw automatically catches exceptions in request handlers and responds with a 500. I found it a little hard to debug as the debug logging only includes the error name and message but not the error stack.
msw/src/setupWorker/start/createRequestListener.ts
Lines 99 to 109 in 638fad9
It would be nice if this error logging also included the stack.
Beta Was this translation helpful? Give feedback.
All reactions