1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2024-12-26 15:42:27 -05:00

Fix ajax error handling

This commit is contained in:
Aaron Lindsay 2017-01-09 21:22:13 -05:00
parent 871aa88ea6
commit c6cf817b2c
5 changed files with 16 additions and 16 deletions

View File

@ -87,7 +87,7 @@ function fetchAll() {
} }
}, },
error: function(jqXHR, status, error) { error: function(jqXHR, status, error) {
dispatch(ErrorActions.ajaxError(e)); dispatch(ErrorActions.ajaxError(error));
} }
}); });
}; };
@ -114,7 +114,7 @@ function create(account) {
} }
}, },
error: function(jqXHR, status, error) { error: function(jqXHR, status, error) {
dispatch(ErrorActions.ajaxError(e)); dispatch(ErrorActions.ajaxError(error));
} }
}); });
}; };
@ -141,7 +141,7 @@ function update(account) {
} }
}, },
error: function(jqXHR, status, error) { error: function(jqXHR, status, error) {
dispatch(ErrorActions.ajaxError(e)); dispatch(ErrorActions.ajaxError(error));
} }
}); });
}; };
@ -165,7 +165,7 @@ function remove(account) {
} }
}, },
error: function(jqXHR, status, error) { error: function(jqXHR, status, error) {
dispatch(ErrorActions.ajaxError(e)); dispatch(ErrorActions.ajaxError(error));
} }
}); });
}; };

View File

@ -13,7 +13,7 @@ function serverError(error) {
function ajaxError(error) { function ajaxError(error) {
var e = new Error(); var e = new Error();
e.ErrorId = 5; e.ErrorId = 5;
e.ErrorString = "Request Failed: " + status + error; e.ErrorString = "Request Failed: " + error;
return { return {
type: ErrorConstants.ERROR_AJAX, type: ErrorConstants.ERROR_AJAX,

View File

@ -87,7 +87,7 @@ function fetchAll() {
} }
}, },
error: function(jqXHR, status, error) { error: function(jqXHR, status, error) {
dispatch(ErrorActions.ajaxError(e)); dispatch(ErrorActions.ajaxError(error));
} }
}); });
}; };
@ -114,7 +114,7 @@ function create(security) {
} }
}, },
error: function(jqXHR, status, error) { error: function(jqXHR, status, error) {
dispatch(ErrorActions.ajaxError(e)); dispatch(ErrorActions.ajaxError(error));
} }
}); });
}; };
@ -141,7 +141,7 @@ function update(security) {
} }
}, },
error: function(jqXHR, status, error) { error: function(jqXHR, status, error) {
dispatch(ErrorActions.ajaxError(e)); dispatch(ErrorActions.ajaxError(error));
} }
}); });
}; };
@ -165,7 +165,7 @@ function remove(security) {
} }
}, },
error: function(jqXHR, status, error) { error: function(jqXHR, status, error) {
dispatch(ErrorActions.ajaxError(e)); dispatch(ErrorActions.ajaxError(error));
} }
}); });
}; };

View File

@ -51,7 +51,7 @@ function search(searchString, searchType, limit) {
} }
}, },
error: function(jqXHR, status, error) { error: function(jqXHR, status, error) {
dispatch(ErrorActions.ajaxError(e)); dispatch(ErrorActions.ajaxError(error));
} }
}); });
}; };

View File

@ -96,7 +96,7 @@ function fetch(userId) {
} }
}, },
error: function(jqXHR, status, error) { error: function(jqXHR, status, error) {
dispatch(ErrorActions.ajaxError(e)); dispatch(ErrorActions.ajaxError(error));
} }
}); });
}; };
@ -129,7 +129,7 @@ function create(user) {
} }
}, },
error: function(jqXHR, status, error) { error: function(jqXHR, status, error) {
dispatch(ErrorActions.ajaxError(e)); dispatch(ErrorActions.ajaxError(error));
} }
}); });
}; };
@ -156,7 +156,7 @@ function login(user) {
} }
}, },
error: function(jqXHR, status, error) { error: function(jqXHR, status, error) {
dispatch(ErrorActions.ajaxError(e)); dispatch(ErrorActions.ajaxError(error));
} }
}); });
}; };
@ -182,7 +182,7 @@ function tryResumingSession() {
} }
}, },
error: function(jqXHR, status, error) { error: function(jqXHR, status, error) {
dispatch(ErrorActions.ajaxError(e)); dispatch(ErrorActions.ajaxError(error));
} }
}); });
}; };
@ -206,7 +206,7 @@ function logout() {
} }
}, },
error: function(jqXHR, status, error) { error: function(jqXHR, status, error) {
dispatch(ErrorActions.ajaxError(e)); dispatch(ErrorActions.ajaxError(error));
} }
}); });
}; };
@ -233,7 +233,7 @@ function update(user) {
} }
}, },
error: function(jqXHR, status, error) { error: function(jqXHR, status, error) {
dispatch(ErrorActions.ajaxError(e)); dispatch(ErrorActions.ajaxError(error));
} }
}); });
}; };