pipegate-sdk
Version:
A TypeScript client-side payment authentication SDK for stablecoins used with axios
15 lines (14 loc) • 510 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.formatAxiosError = formatAxiosError;
function formatAxiosError(error) {
const status = error.response?.status || "N/A";
const statusText = error.response?.statusText || "N/A";
const url = error.config?.url || "N/A";
const method = error.config?.method || "N/A";
return `Axios Error:
- Message: ${error.message}
- Status: ${status} ${statusText}
- Method: ${method.toUpperCase()}
- URL: ${url}`;
}