ramiel / router.js

Router.js is a simple and powerful javascript library to handle routing
116 stars 21 forks source link

Option to disable auto.error handlers #31

Open ramiel opened 5 years ago

ramiel commented 5 years ago

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

smoelker commented 8 months ago

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 :)

ramiel commented 8 months ago

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?