Add triggers support for notFound routes
See original GitHub issueWhen I add a notFound handler I would expect it to also support triggers because it mimics the interface of the normal routes. But if I go to a unknown route with following notFound handler:
function trigger () {
debugger;
}
FlowRouter.notFound = {
triggersEnter: [trigger],
action: function() {
debugger;
}
};
The triggersEnter doesn’t get executed at all.
This is clearly a problem for me as I want to do a hard browser load on the requested not found url. But the action handler doesn’t have the context of the original request just the ‘*’ route.
Issue Analytics
- State:
- Created 8 years ago
- Comments:15 (5 by maintainers)
Top Results From Across the Web
GetStaticProps returning initial notFound never triggers a ...
I am encountering a similar experience (but somewhat in reverse). The initial static page with a dynamic route is built successfully.
Read more >Express trigger not found route for each route - Stack Overflow
When I run your code, I do not get the output you show, so something about your real code is apparently different than...
Read more >Angular Router: Child Routes, Auxiliary Routes, Master Detail
This is a comprehensive guide to the fundamental concepts of the Angular Router: routes, paths, components, outlets.
Read more >Page not found for route "/login" - Netlify Support Forums
I have a problem similar to the ones above, I can't find my route “/login” that ... After adding the rule to one...
Read more >Troubleshoot and diagnose workflow failures - Azure Logic Apps
To help with debugging, you can add diagnostic steps to a logic app workflow, along with reviewing the trigger and runs history. For...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can do it via the Meta package and use it through the action function. There you can set the status code to 404. Here’s my snippet
I’ve learned a lot from you, I’m glad to help out when I can ^_^