-
Notifications
You must be signed in to change notification settings - Fork 57
raiseThrowables() - Issue here or in Expressive? #84
Comments
First of: the Second, I would likely put the Third, you should add some sort of middleware to pipe following the dispatch middleware for the purpose of returning a 404 response. We include an implementation in Stratigility ( Try the above suggestions, and let me know if they resolve the issue. |
Issue unresolved. I have a gist of the output if that helps. The Exception is being thrown in
Edit: The combined configs can be found in this gist. (I sorted the invokables and factories for easier reading.) |
@weierophinney I'll close this now as it's an Expressive issue that will be fixed in 1.1 (or with |
404s cannot be handled early! You won't have a route result until after the routing middleware has executed, which is why I suggested pushing the 404 middleware to the last item in the pipeline. I may have found the problem; after I get #85 merged and 1.3.1 released, I'd encourage you to try that. Also, read the RFC for Expressive 1.1 that I linked you to on another issue to get an idea of how you may want to setup your application. This will be easier with Expressive 1.1, but should be possible with a small amount of effort now. |
@weierophinney Sorry for the confusion - by "early", I meant between routing and dispatch as opposed to the end of the pipeline. I did read the gist (and made a comment!) and was able to change over my code to a programmatic pipeline in about 20 minutes. I had already changed the middleware to the hybrid invoke/process scheme when composer updated me to 1.3. I'm fully functioning now and ready for expressive 1.1 and stratagility 2 when it comes! My middleware extends
I should point out that your v2 migration doc includes examples with
Which don't exist (yet). |
I might just have really bad timing with this, but I'm having issues with 1.3.0 and Expressive
master
branch which I think is related toraiseThrowables()
. I'm using configuration-driven pipelining, and have converted to the new style of handling errors, butthrow
n exceptions are not bubbling their way out to the error middleware - they are hitting the error depreciation notice inNext
.Do I just need to wait till Expressive is updated, or is this a Stratigility issue?
FWIW, here is my pipeline config (I factory
ErrorHandler
for a custom generator):Edit - I removed the
error => true
from the bottom pipeline group and it didn't help. Config changed to reflect that.The text was updated successfully, but these errors were encountered: