i was doing my try catches and assinging all error status codes as 500 and i want to know if is it possible to get error status code for example inside catch block, like this:
instead of this
catch(err){
return res.status(500).send({
message: err.message
})
}
this:
catch(err){
return res.status(err.statusCode).send({
message: err.message
})
}
i checked docs but there is no word about this