-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Send errors from filters to the application HttpErrorHandler #8091
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
Conversation
a48add9 to
3b56952
Compare
framework/build.sbt
Outdated
| lazy val PlayFramework = Project("Play-Framework", file(".")) | ||
| .enablePlugins(PlayRootProject) | ||
| .enablePlugins(PlayWhitesourcePlugin) | ||
| //.enablePlugins(PlayWhitesourcePlugin) |
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 think you run into the same error as me, actually what helped is just remove all target folders or checkout the source code again.
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.
The same happened to me once. Confirming that removing all target folders resolve the problem.
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'll remove this. I just ran into the error and didn't have time to figure it out.
|
does this have a performance impact? |
3b56952 to
1702333
Compare
|
Okay so I ran Before: After: It seems like it may have slowed things down very slightly but it's hard to tell. |
|
well I would say this is fine. it's still in the derivation. |
|
|
||
| trait HttpFiltersSpec extends PlaySpecification with ServerIntegrationSpecification { | ||
|
|
||
| sequential |
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.
BTW, with new integration tests you can use the new "endpoint" integration test style which (a) avoids global state so we can do parallel testing and (b) has tests for HTTPS and HTTP/2.
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.
Good idea. I moved to the new endpoint integration style.
| } | ||
|
|
||
| @deprecated("This method is an internal API and should not be public", "2.6.10") | ||
| def executeAction( |
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 agree it makes sense to deprecate this.
1702333 to
8b11f76
Compare
8b11f76 to
ed35af6
Compare
|
backport to 2.6.x: 3d784e9 |
Fixes #8089
This refactors the request handling code in the
AkkaHttpServerandNettyServerslightly, so that the action is always executed in a future using the Play default execution context, then that future is flatMapped with a function that runs the body accumulator, and the resulting future is recovered using the error handler.I added a test that tests with both the
FilterandEssentialFiltercase.