Last active
December 25, 2015 05:39
-
-
Save tkh44/6926580 to your computer and use it in GitHub Desktop.
Utility to give a meaningful error from backbone xhr.
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
| digestXHR: function(xhr) { | |
| return xhr.status + ' ' + xhr.statusText + '\nResponse text: ' + (xhr.responseText.length > 0 ? xhr.responseText : 'No response.'); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment