Created
May 1, 2014 17:49
-
-
Save traviskroberts/68f08a1a61b5b8b6af08 to your computer and use it in GitHub Desktop.
Code to handle global ajax error codes.
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
# handle api errors | |
$.ajaxSetup | |
statusCode: | |
401: -> | |
# authentication error | |
404: -> | |
# not found | |
500: -> | |
# application error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment