示例#1
0
文件: auth_configs.js 项目: cv/gocd
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)};
  }
};
示例#2
0
文件: agents.js 项目: cv/gocd
const reject = (deferred) => (jqXHR, _textStatus, _errorThrown) => {
  deferred.reject(mrequest.unwrapErrorExtractMessage(jqXHR.responseJSON, jqXHR));
};
示例#3
0
 const didReject = (jqXHR) => {
   deferred.reject(mrequest.unwrapErrorExtractMessage(jqXHR.responseJSON, jqXHR));
 };
示例#4
0
文件: crud_mixins.js 项目: cv/gocd
 const didReject = ({responseJSON}, _textStatus, _errorThrown) => {
   deferred.reject(mrequest.unwrapErrorExtractMessage(responseJSON));
 };