Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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!',
- });
- }
- }
- }
Add Comment
Please, Sign In to add comment