mirror of
				https://github.com/aclindsa/moneygo.git
				synced 2025-10-30 09:33:25 -04:00 
			
		
		
		
	Fix ajax error handling
This commit is contained in:
		| @@ -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)); | ||||||
| 			} | 			} | ||||||
| 		}); | 		}); | ||||||
| 	}; | 	}; | ||||||
|   | |||||||
| @@ -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, | ||||||
|   | |||||||
| @@ -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)); | ||||||
| 			} | 			} | ||||||
| 		}); | 		}); | ||||||
| 	}; | 	}; | ||||||
|   | |||||||
| @@ -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)); | ||||||
| 			} | 			} | ||||||
| 		}); | 		}); | ||||||
| 	}; | 	}; | ||||||
|   | |||||||
| @@ -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)); | ||||||
| 			} | 			} | ||||||
| 		}); | 		}); | ||||||
| 	}; | 	}; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user