const VerifyConnectionResponse = function (xhr, etag) { if (xhr.status === 422) { const authConfig = AuthConfigs.AuthConfig.fromJSON(xhr.responseJSON.auth_config); authConfig.etag(etag); return { authConfig, errorMessage: xhr.responseJSON.message, status: xhr.responseJSON.status }; } else { return {errorMessage: mrequest.unwrapErrorExtractMessage(xhr.responseJSON, xhr)}; } };
const reject = (deferred) => (jqXHR, _textStatus, _errorThrown) => { deferred.reject(mrequest.unwrapErrorExtractMessage(jqXHR.responseJSON, jqXHR)); };
const didReject = (jqXHR) => { deferred.reject(mrequest.unwrapErrorExtractMessage(jqXHR.responseJSON, jqXHR)); };
const didReject = ({responseJSON}, _textStatus, _errorThrown) => { deferred.reject(mrequest.unwrapErrorExtractMessage(responseJSON)); };