Created
August 4, 2015 10:54
-
-
Save Artur-Sulej/63bcc74053afc0ce6479 to your computer and use it in GitHub Desktop.
Convenient function for creating http errors in JavaScript.
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 HTTP_Error(msg, status) { | |
var error = new Error(msg); | |
error.status = status; | |
return error; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment