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

Handle exceptions from scotty as ScottyException #345

Closed fumieval closed 7 months ago

fumieval commented 9 months ago

This change replaces the use of StatusError by ScottyException. The idea is to avoid returning a error response in an arbitrary format and make it more reasonable to catch them, because catching StatusError doesn't make much sense

For the sake of compatibility, I kept the StatusError type but I think it should eventually be deprecated.

closes #338

fumieval commented 9 months ago

@ocramz Do you have any remaining concerns?

fumieval commented 8 months ago

I'm going to deprecate raiseStatus in a separate PR.

fumieval commented 8 months ago

@ocramz ping

ocramz commented 8 months ago

Hi @fumieval! I haven't forgotten about this, it's just that I'm on a family holiday until the end of the month. Will look at it then! Best, Marco

On Tue, 21 Nov 2023 at 15:49, Fumiaki Kinoshita @.***> wrote:

@ocramz https://github.com/ocramz ping

— Reply to this email directly, view it on GitHub https://github.com/scotty-web/scotty/pull/345#issuecomment-1820332565, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNBDKGHTZC6A7TS5WTF5CLYFRFGVAVCNFSM6AAAAAA6IR7HZ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRQGMZTENJWGU . You are receiving this because you were mentioned.Message ID: @.***>

fumieval commented 8 months ago

@ocramz I see, great! Have a wonderful vacation

ocramz commented 7 months ago

@fumieval could you add a Changelog entry about this as well please?

fumieval commented 7 months ago

@ocramz Sure, I updated the changelog