UNPKG

pipegate-sdk

Version:

A TypeScript client-side payment authentication SDK for stablecoins used with axios

12 lines (11 loc) 395 B
export 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}`; }