env variables through different file and optimizing error handling with middleware
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
module.exports = (status, message) => {
|
||||
const error = new Error(message);
|
||||
error.status = status;
|
||||
return error;
|
||||
};
|
||||
Reference in New Issue
Block a user