This repository was archived by the owner on Oct 7, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,18 @@ export default async function(step: any, config) {
2929}
3030*/
3131async function default_1 ( step , config ) {
32- return ( await axios_1 . default ( config ) ) . data ;
32+ // XXX warn about mutating config object... or clone?
33+ for ( const k in config . headers || { } ) {
34+ if ( typeof config . headers [ k ] === "undefined" ) {
35+ delete config . headers [ k ] ;
36+ }
37+ }
38+ try {
39+ return ( await axios_1 . default ( config ) ) . data ;
40+ }
41+ catch ( err ) {
42+ this . debug = err . response ;
43+ throw err ;
44+ }
3345}
3446exports . default = default_1 ;
Original file line number Diff line number Diff line change @@ -29,5 +29,16 @@ export default async function(step: any, config) {
2929*/
3030
3131export default async function ( step : any , config ) {
32- return ( await axios ( config ) ) . data
32+ // XXX warn about mutating config object... or clone?
33+ for ( const k in config . headers || { } ) {
34+ if ( typeof config . headers [ k ] === "undefined" ) {
35+ delete config . headers [ k ]
36+ }
37+ }
38+ try {
39+ return ( await axios ( config ) ) . data
40+ } catch ( err ) {
41+ this . debug = err . response
42+ throw err
43+ }
3344}
You can’t perform that action at this time.
0 commit comments