I would like to get information in my error handler what endpoint was handling it. The problem that I have is that when error handler is run req.baseUrl is not available
I wanted to use line like this
var endpoint = req.route ? (req.baseUrl + req.route.path) : '<no endpoint>';
but when route is mounted i.e at /users/ I can get only :id and empty baseUrl. I don't want to have information about individual request like /users/myname
I would like to get information in my error handler what endpoint was handling it. The problem that I have is that when error handler is run
req.baseUrlis not availableI wanted to use line like this
but when route is mounted i.e at
/users/I can get only:idand emptybaseUrl. I don't want to have information about individual request like/users/myname