another inconsistency from the Netlify example on ...
# support-questions-legacy
a
another inconsistency from the Netlify example on Github. this snippet
Copy code
app.use((err, req, res, next) => {
    console.log(err);
    res.send(
        "Something went wrong. Please see error here: https://app.netlify.com/sites/hardcore-goodall-fd3278/functions/api"
    );
});
results in an error because
req
and
res
should be the first and second arguments, respectively. I have no idea how this could work as it is written now. I am not even sure
err
is part of the function signature. I just put
req
and
res
as 1st and 2nd args and it worked out.