mirror of
https://github.com/aclindsa/moneygo.git
synced 2024-09-21 12:20:04 -04:00
28 lines
481 B
JavaScript
28 lines
481 B
JavaScript
var ErrorConstants = require('../constants/ErrorConstants');
|
|
|
|
var models = require('../models.js');
|
|
var Error = models.Error;
|
|
|
|
function serverError(error) {
|
|
return {
|
|
type: ErrorConstants.ERROR_SERVER,
|
|
error: error
|
|
};
|
|
}
|
|
|
|
function ajaxError(error) {
|
|
var e = new Error();
|
|
e.ErrorId = 5;
|
|
e.ErrorString = "Request Failed: " + status + error;
|
|
|
|
return {
|
|
type: ErrorConstants.ERROR_AJAX,
|
|
error: e
|
|
};
|
|
}
|
|
|
|
module.exports = {
|
|
serverError: serverError,
|
|
ajaxError: ajaxError
|
|
};
|