@blackflux/axios
Advanced tools
Comparing version 1.0.1 to 1.1.0
import axios from 'axios'; | ||
import { Retainer } from 'object-fields'; | ||
export default (...kwargs) => axios(...kwargs); | ||
export default async (...kwargs) => { | ||
try { | ||
return await axios(...kwargs); | ||
} catch (e) { | ||
Retainer([ | ||
'code', | ||
'config.{headers,method,url,data}', | ||
'response.{headers,status,statusText,data}' | ||
])(e); | ||
throw e; | ||
} | ||
}; |
{ | ||
"name": "@blackflux/axios", | ||
"type": "module", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"main": "lib/index.js", | ||
@@ -37,2 +37,3 @@ "repository": { | ||
"js-gardener": "3.0.5", | ||
"lambda-monitor-logger": "4.0.0", | ||
"node-tdd": "3.4.2", | ||
@@ -73,4 +74,5 @@ "smart-fs": "3.0.1" | ||
"dependencies": { | ||
"axios": "0.27.2" | ||
"axios": "0.27.2", | ||
"object-fields": "3.0.1" | ||
} | ||
} |
@@ -5,1 +5,4 @@ [![Build Status](https://circleci.com/gh/blackflux/axios.png?style=shield)](https://circleci.com/gh/blackflux/axios) | ||
# Axios Wrapper | ||
This library does the following: | ||
- Redacts verbose information from error AxiosError |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
4036
14
8
0
2
17
+ Addedobject-fields@3.0.1
+ Addedobject-fields@3.0.1(transitive)
+ Addedobject-scan@17.0.0(transitive)