Esempio n. 1
0
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)};
  }
};
Esempio n. 2
0
File: agents.js Progetto: cv/gocd
const reject = (deferred) => (jqXHR, _textStatus, _errorThrown) => {
  deferred.reject(mrequest.unwrapErrorExtractMessage(jqXHR.responseJSON, jqXHR));
};
Esempio n. 3
0
 const didReject = (jqXHR) => {
   deferred.reject(mrequest.unwrapErrorExtractMessage(jqXHR.responseJSON, jqXHR));
 };
Esempio n. 4
0
 const didReject = ({responseJSON}, _textStatus, _errorThrown) => {
   deferred.reject(mrequest.unwrapErrorExtractMessage(responseJSON));
 };