Files
using-cash-spike/node_modules/axios/lib/core/settle.js
T
Mikael BergandPaperclip 970f1f1395 docs: revise infra recommendation — self-hosted own hardware, not cloud VPS
Board clarified all silicon should run on own infrastructure, not cloud/VPS.
Updated node-vs-api.md and infra-cost.md to reflect:
- Production recommendation: BCHN + Fulcrum on own hardware (~$0-7/month marginal)
- Hardware requirements: 4 cores, 8 GB RAM, 500 GB SSD minimum
- BCH bandwidth is ~2-5 GB/month (much lighter than BTC)
- Cloud/VPS figures retained as reference-only fallback ceiling

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-17 16:23:31 +00:00

28 lines
846 B
JavaScript

'use strict';
import AxiosError from './AxiosError.js';
/**
* Resolve or reject a Promise based on response status.
*
* @param {Function} resolve A function that resolves the promise.
* @param {Function} reject A function that rejects the promise.
* @param {object} response The response.
*
* @returns {object} The response.
*/
export default function settle(resolve, reject, response) {
const validateStatus = response.config.validateStatus;
if (!response.status || !validateStatus || validateStatus(response.status)) {
resolve(response);
} else {
reject(new AxiosError(
'Request failed with status code ' + response.status,
response.status >= 400 && response.status < 500 ? AxiosError.ERR_BAD_REQUEST : AxiosError.ERR_BAD_RESPONSE,
response.config,
response.request,
response
));
}
}