Skip to content

Instantly share code, notes, and snippets.

@ruprict
Last active October 14, 2015 18:47
Show Gist options
  • Save ruprict/4a6264dbdd9b20b6a236 to your computer and use it in GitHub Desktop.
Save ruprict/4a6264dbdd9b20b6a236 to your computer and use it in GitHub Desktop.
function deserializeError(res) {
// new rejected Promise to go down failure chain
return deserialize(res).then(function(body){
throw body;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment