Library to redact sensitive information from Axios errors. Current stable version is 1.1.144. Works with axios@^0 and axios@^1. Provides both an interceptor for axios instances and standalone usage. Key differentiator: specifically designed for Axios error redaction with configurable redaction of request/response/query data. Ships TypeScript types.
npm install axios-error-redactNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to use createErrorInterceptor as an axios response interceptor and the isHttpErrorResponse type guard.
Ensure usage: instance.interceptors.response.use(undefined, createErrorInterceptor())
Always check the error with isHttpErrorResponse before accessing redacted properties.
Update code relying on the old shape; use the documented HttpErrorResponse fields.
Run 'npm install axios-error-redact'
Use import { createErrorInterceptor } from 'axios-error-redact'Use if (isHttpErrorResponse(error)) { ... } to narrow type.