router.js icon indicating copy to clipboard operation
router.js copied to clipboard

Option to disable auto.error handlers

Open ramiel opened this issue 4 years ago • 2 comments

Add an option to the router to disable default handlers for 404 and 500 errors.

ramiel avatar Sep 08 '19 09:09 ramiel

The workaround I use to prevent those annoying console messages (Path "/whatever..." not matched), is to add a catch all-handler (registered after all other handlers). Maybe this will work for you too?


    router.get(/\/(.*)/i, (req, context) => {
        // console.debug('catch all!');
    });

Update: lol, I didn't realize you are the repo owner :)

smoelker avatar Dec 20 '23 20:12 smoelker

Eheh, I wrote the issue more as a reminder for myself. I wonder if anybody is still using this library though. Any good use case?

ramiel avatar Dec 20 '23 22:12 ramiel