blocks/bla/bla.js
function (defer, xhr) {
                var errorType = xhr.type || xhr.status;
                var errorMessage = xhr.responseText || xhr.message || xhr.statusText;
                defer.reject(new ApiError(errorType, errorMessage));
            }
function (defer, xhr) {
                var errorType = xhr.type || xhr.status;
                var errorMessage = xhr.responseText || xhr.message || xhr.statusText;
                defer.reject(new ApiError(errorType, errorMessage));
            }
function ( defer , xhr ) { var errorType = xhr . type || xhr . status ; var errorMessage = xhr . responseText || xhr . message || xhr . statusText ; defer . reject ( new ApiError ( errorType , errorMessage ) ) ; }
Rejects deferred promise.

@param {vow.Deferred} defer
@param {XMLHttpRequest} xhr
Rejects deferred promise .