Created
August 10, 2012 08:13
-
-
Save aratak/3312543 to your computer and use it in GitHub Desktop.
ajax exceptions
This file contains hidden or 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
$.ajaxSetup | |
statusCode: | |
401: -> $.pub('flash:show', text: "You have been logged out. Please, <a href='javascript:window.location.reload()'><span class='icon'>X</span>refresh</a> the page", type: 'warning', hide: false) | |
404: -> $.pub('flash:show', text: "Page not found", type: 'warning', hide: false) | |
500: -> $.pub('flash:show', text: "Oops! Something went wrong.", type: 'warning', hide: false) | |
error: -> $.pub('flash:show', text: "Can't connect to the server. Please, check your internet connection.", type: 'warning', hide: false) | |
timeout: -> $.pub('flash:show', text: "Server is not response. Please, <a href='http://turbinehq.com/contact/'>report about that to us</a>.", type: 'warning', hide: false) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment