-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test on handler priority #373
base: master
Are you sure you want to change the base?
Conversation
@cblp Thanks, but we can't merge code if it breaks CI. If you want to show a problem with the current implementation, could you make a dedicated subsection in the tests ("context"..) and rewrite tests such that they pass? |
I can't make it pass without changing main implementation. |
@ocramz what do you think of this implementation? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like some new tests that clarify the need for the new exception handler priority.
@@ -111,9 +111,9 @@ runAction :: MonadUnliftIO m => | |||
-> m (Maybe Response) | |||
runAction mh env action = do | |||
ok <- flip runReaderT env $ runAM $ tryNext $ action `catches` concat | |||
[ [actionErrorHandler] | |||
[ [actionErrorHandler, statusErrorHandler, scottyExceptionHandler] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes the behaviour of the library, but it's not caught in the tests.
I'm not sure how to write such tests, I did it intuitively. I just want to see exception when it is thown from a handler. |
No description provided.