Skip to content

Instantly share code, notes, and snippets.

@orangeeli
Created May 16, 2016 18:47
Show Gist options
  • Save orangeeli/2cab4dbf81bfe489d6b3fb73703593f9 to your computer and use it in GitHub Desktop.
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.
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