route(..).throws(...) eats stack trace
See original GitHub issueHey, project is really cool, just starting to dig into it… leaps and bounds better than my original plan of having to do hand rolled annotation + processing. One issue I’m running into is that it seems that
apiRouting {
route("/example").throws(exampleError)
will eat the underlying stack trace, and simply output something similar to
ktor.application - 500 Internal Server Error: POST - /example
Obvious this isn’t ideal for a variety of reasons 😄
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
react-router eats stack traces in willTransitionTo (and subsequently ...
I wasn't seeing a stack trace because I was calling Routes.run inside of a promise. ... when you are creating the router, and...
Read more >Rethrowing exceptions in Java without losing the stack trace
In Java, you just throw the exception you caught, so throw e rather than just throw . Java maintains the stack trace.
Read more >Why you cannot have C++ exceptions with a stack trace
I work with projects where stack traces are added automatically to exceptions during throw. It works quite well, and in fact I would...
Read more >Kotlin coroutines stack trace issue - Reddit
The stack trace doesn't represent the true coroutine call stack when the exception was created: calls of functions fun3 and fun2 are absent....
Read more >I want my pony! Or why you cannot have C++ exceptions with ...
Many modern languages such as Java and C# provide the capability, once an exception is generated, to retrieve the stack trace of all...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It actually works properly, the throws catches the exception and handles it as a response as it is no longer considered an error. You can print it in the handler if you need to, there is a parameter that accepts a transform function in
apiException
Oh I had forgotten about this ticket, I’m going to close it since this is expected behavior