1 line
2.2 KiB
JSON
1 line
2.2 KiB
JSON
{"ast":null,"code":"'use strict';\n\nvar createError = require('./createError');\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\n\n\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n\n if (!validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError('Request failed with status code ' + response.status, response.config, null, response.request, response));\n }\n};","map":{"version":3,"names":["createError","require","module","exports","settle","resolve","reject","response","validateStatus","config","status","request"],"sources":["/Users/paolasanchez/Desktop/Pry4/Katoikia/katoikia-app/web-ui/sakai-react/node_modules/axios/lib/core/settle.js"],"sourcesContent":["'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n"],"mappings":"AAAA;;AAEA,IAAIA,WAAW,GAAGC,OAAO,CAAC,eAAD,CAAzB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACAC,MAAM,CAACC,OAAP,GAAiB,SAASC,MAAT,CAAgBC,OAAhB,EAAyBC,MAAzB,EAAiCC,QAAjC,EAA2C;EAC1D,IAAIC,cAAc,GAAGD,QAAQ,CAACE,MAAT,CAAgBD,cAArC;;EACA,IAAI,CAACA,cAAD,IAAmBA,cAAc,CAACD,QAAQ,CAACG,MAAV,CAArC,EAAwD;IACtDL,OAAO,CAACE,QAAD,CAAP;EACD,CAFD,MAEO;IACLD,MAAM,CAACN,WAAW,CAChB,qCAAqCO,QAAQ,CAACG,MAD9B,EAEhBH,QAAQ,CAACE,MAFO,EAGhB,IAHgB,EAIhBF,QAAQ,CAACI,OAJO,EAKhBJ,QALgB,CAAZ,CAAN;EAOD;AACF,CAbD"},"metadata":{},"sourceType":"script"} |