Last active
January 10, 2019 04:30
-
-
Save ahmadshobirin/8275d7b11afd41176195503692be349e to your computer and use it in GitHub Desktop.
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
error: function (xhr) { | |
console.log(xhr); | |
if (xhr.readyState === 4) { | |
if (xhr.status === 404) { | |
swal({ | |
type: 'error', | |
title: 'Oops...', | |
text: xhr.responseJSON.error, | |
}); | |
} else { | |
swal({ | |
type: 'error', | |
title: 'Oops...', | |
text: 'Something went wrong!', | |
}); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment