blocks/bla/bla.js
function (defer, response) {
                var error = response.error;
                if (error) {
                    defer.reject(new ApiError(error.type, error.message, error.data));
                } else {
                    defer.resolve(response.data);
                }
            }
function (defer, response) {
                var error = response.error;
                if (error) {
                    defer.reject(new ApiError(error.type, error.message, error.data));
                } else {
                    defer.resolve(response.data);
                }
            }
function ( defer , response ) { var error = response . error ; if ( error ) { defer . reject ( new ApiError ( error . type , error . message , error . data ) ) ; } else { defer . resolve ( response . data ) ; } }
Resolve deferred promise.

@param {vow.Deferred} defer
@param {Object} response Server response.
Resolve deferred promise .