Skip to content

Commit

Permalink
fix(middleware): fixed error structure
Browse files Browse the repository at this point in the history
  • Loading branch information
tirthaguha committed Aug 21, 2021
1 parent 982eb22 commit 2dc946d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/middleware/lib/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
const getLogger = require("@rapidcode/logger");
const logger = getLogger("@rapidcode/middleware");

const createErrorObj = (message, status = 500) => {
const createErrorObj = (error, status = 500) => {
// console.log(">>>>>>>>", error.message);
const {message} = error;
return {
status,
message,
Expand Down

0 comments on commit 2dc946d

Please sign in to comment.