Closed ghost closed 2 years ago
I am currently in dev and next-connect shows the whole error stacktrace to the frontend (client) is this intended ? using nextjs. Couldnt find any hide mechanism ! Thanks
You should define the onError function:
onError
const handler = nc({ onError: (err, req, res, next) => { console.error(err.stack); // log error res.status(500).end("Something broke!"); // show a specific message }, })
I am currently in dev and next-connect shows the whole error stacktrace to the frontend (client) is this intended ? using nextjs. Couldnt find any hide mechanism ! Thanks