mirror of
				https://github.com/aclindsa/moneygo.git
				synced 2025-11-03 18:13:27 -05:00 
			
		
		
		
	Fix ajax error handling
This commit is contained in:
		@@ -87,7 +87,7 @@ function fetchAll() {
 | 
			
		||||
				}
 | 
			
		||||
			},
 | 
			
		||||
			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) {
 | 
			
		||||
				dispatch(ErrorActions.ajaxError(e));
 | 
			
		||||
				dispatch(ErrorActions.ajaxError(error));
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
	};
 | 
			
		||||
@@ -141,7 +141,7 @@ function update(account) {
 | 
			
		||||
				}
 | 
			
		||||
			},
 | 
			
		||||
			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) {
 | 
			
		||||
				dispatch(ErrorActions.ajaxError(e));
 | 
			
		||||
				dispatch(ErrorActions.ajaxError(error));
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
	};
 | 
			
		||||
 
 | 
			
		||||
@@ -13,7 +13,7 @@ function serverError(error) {
 | 
			
		||||
function ajaxError(error) {
 | 
			
		||||
	var e = new Error();
 | 
			
		||||
	e.ErrorId = 5;
 | 
			
		||||
	e.ErrorString = "Request Failed: " + status + error;
 | 
			
		||||
	e.ErrorString = "Request Failed: " + error;
 | 
			
		||||
 | 
			
		||||
	return {
 | 
			
		||||
		type: ErrorConstants.ERROR_AJAX,
 | 
			
		||||
 
 | 
			
		||||
@@ -87,7 +87,7 @@ function fetchAll() {
 | 
			
		||||
				}
 | 
			
		||||
			},
 | 
			
		||||
			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) {
 | 
			
		||||
				dispatch(ErrorActions.ajaxError(e));
 | 
			
		||||
				dispatch(ErrorActions.ajaxError(error));
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
	};
 | 
			
		||||
@@ -141,7 +141,7 @@ function update(security) {
 | 
			
		||||
				}
 | 
			
		||||
			},
 | 
			
		||||
			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) {
 | 
			
		||||
				dispatch(ErrorActions.ajaxError(e));
 | 
			
		||||
				dispatch(ErrorActions.ajaxError(error));
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
	};
 | 
			
		||||
 
 | 
			
		||||
@@ -51,7 +51,7 @@ function search(searchString, searchType, limit) {
 | 
			
		||||
				}
 | 
			
		||||
			},
 | 
			
		||||
			error: function(jqXHR, status, error) {
 | 
			
		||||
				dispatch(ErrorActions.ajaxError(e));
 | 
			
		||||
				dispatch(ErrorActions.ajaxError(error));
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
	};
 | 
			
		||||
 
 | 
			
		||||
@@ -96,7 +96,7 @@ function fetch(userId) {
 | 
			
		||||
				}
 | 
			
		||||
			},
 | 
			
		||||
			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) {
 | 
			
		||||
				dispatch(ErrorActions.ajaxError(e));
 | 
			
		||||
				dispatch(ErrorActions.ajaxError(error));
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
	};
 | 
			
		||||
@@ -156,7 +156,7 @@ function login(user) {
 | 
			
		||||
				}
 | 
			
		||||
			},
 | 
			
		||||
			error: function(jqXHR, status, error) {
 | 
			
		||||
				dispatch(ErrorActions.ajaxError(e));
 | 
			
		||||
				dispatch(ErrorActions.ajaxError(error));
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
	};
 | 
			
		||||
@@ -182,7 +182,7 @@ function tryResumingSession() {
 | 
			
		||||
				}
 | 
			
		||||
			},
 | 
			
		||||
			error: function(jqXHR, status, error) {
 | 
			
		||||
				dispatch(ErrorActions.ajaxError(e));
 | 
			
		||||
				dispatch(ErrorActions.ajaxError(error));
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
	};
 | 
			
		||||
@@ -206,7 +206,7 @@ function logout() {
 | 
			
		||||
				}
 | 
			
		||||
			},
 | 
			
		||||
			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) {
 | 
			
		||||
				dispatch(ErrorActions.ajaxError(e));
 | 
			
		||||
				dispatch(ErrorActions.ajaxError(error));
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
	};
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user