src/network/error-parsing.js
function _treatEntityExceptions(responseJSON = {}, options) {
    const { node } = options;
    const fieldJSONError = responseJSON.fieldErrors || {};
    let fieldErrors = {};
    if (isArray(node)) {
        node.forEach((nd) => { fieldErrors[nd] = _treatEntityDetail(fieldJSONError[nd]); });
    } else {
        fieldErrors = _treatEntityDetail(fieldJSONError);
    }

    return fieldErrors;
}
function _treatEntityExceptions(responseJSON = {}, options) {
    const { node } = options;
    const fieldJSONError = responseJSON.fieldErrors || {};
    let fieldErrors = {};
    if (isArray(node)) {
        node.forEach((nd) => { fieldErrors[nd] = _treatEntityDetail(fieldJSONError[nd]); });
    } else {
        fieldErrors = _treatEntityDetail(fieldJSONError);
    }

    return fieldErrors;
}
function _treatEntityExceptions ( responseJSON = { } , options ) { const { node } = options ; const fieldJSONError = responseJSON . fieldErrors || { } ; let fieldErrors = { } ; if ( isArray ( node ) ) { node . forEach ( ( nd ) => { fieldErrors [ nd ] = _treatEntityDetail ( fieldJSONError [ nd ] ) ; } ) ; } else { fieldErrors = _treatEntityDetail ( fieldJSONError ) ; } return fieldErrors ; }
Treat the response json of an error.
@param  {object} responseJSON The json response from the server.
@param  {object} options The options containing the model. {model: Backbone.Model}
@return {object} The constructed object from the error response.
Treat the response json of an error .