scotty-web / scotty

Haskell web framework inspired by Ruby's Sinatra, using WAI and Warp (Official Repository)
http://hackage.haskell.org/package/scotty
BSD 3-Clause "New" or "Revised" License
1.71k stars 132 forks source link

Exception information is lost #372

Closed cblp closed 4 months ago

cblp commented 5 months ago

When any unknown exception happens, someExceptionHandler catches it and drops all information.

So I don't know how to put it in log to investigate. If it's possible please tell how.

Also, unhandledExceptionHandler has no sense because scottyExceptionHandler already caught all ScottyExceptions.

cblp commented 5 months ago

At least, print SomeException to stdout when verbose is on.

ocramz commented 5 months ago

Could you share a minimal repro (or even better, a PR with a test case)?

On Fri, 9 Feb 2024 at 16:17, Yuriy Syrovetskiy @.***> wrote:

At least, print SomeException to stdout when verbose is on.

— Reply to this email directly, view it on GitHub https://github.com/scotty-web/scotty/issues/372#issuecomment-1936111490, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNBDKCN6BVC6BE6OVIBQH3YSY4WZAVCNFSM6AAAAABDBUA6ZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZWGEYTCNBZGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

ocramz commented 5 months ago

@cblp I agree we could be logging and not dropping information in handlers (PRs welcome!)

I don't agree with the assessment re. unhandledExceptionHandler because there are effects outside ActionT as well.

cblp commented 5 months ago

@ocramz see #373. It's not exactly what I mean, but related. I don't know how to test existence/absence of putStr.

ocramz commented 5 months ago

@cblp good point about verbose too. Currently, verbose does nothing useful apart from toggling the initial banner and should definitely be improved.

cblp commented 4 months ago

@cblp good point about verbose too. Currently, verbose does nothing useful apart from toggling the initial banner and should definitely be improved.

See #374

ocramz commented 4 months ago

closed by #374