Created
May 16, 2016 18:47
-
-
Save orangeeli/2cab4dbf81bfe489d6b3fb73703593f9 to your computer and use it in GitHub Desktop.
A small code snippet of the error handling function for the parse promise failure.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function handleError (res, message) { | |
return function (error) { | |
res.json(`${message} ${JSON.stringify(error)}`); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment