Skip to content

Commit

Permalink
fix bug when originalError does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
vsuaste committed Feb 19, 2019
1 parent 9144f7e commit d7e3769
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ app.use('/login', cors(), (req, res)=>{
formatError(error){
return {
message: error.message,
details: error.originalError.errors,
details: error.originalError && error.originalError.errors ? error.originalError.errors : "",
path: error.path
};
}
Expand Down

0 comments on commit d7e3769

Please sign in to comment.