Skip to content

Commit d7e3769

Browse files
committed
fix bug when originalError does not exist
1 parent 9144f7e commit d7e3769

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ app.use('/login', cors(), (req, res)=>{
9191
formatError(error){
9292
return {
9393
message: error.message,
94-
details: error.originalError.errors,
94+
details: error.originalError && error.originalError.errors ? error.originalError.errors : "",
9595
path: error.path
9696
};
9797
}

0 commit comments

Comments
 (0)