File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -14,13 +14,16 @@ export function httpClient(options: HttpClientParams): AxiosInstance {
1414 httpsAgent : false ,
1515 timeout : 30000 ,
1616 logHandler : ( level : string , data ?: any ) => {
17- if ( level === 'error' && data ) {
18- const title = [ data . name , data . message ] . filter ( ( a ) => a ) . join ( ' - ' ) ;
19- console . error ( `[error] ${ title } ` ) ;
20-
17+ if ( level === 'error' ) {
18+ if ( data ) {
19+ const title = [ data . name , data . message ] . filter ( ( a ) => a ) . join ( ' - ' ) ;
20+ console . error ( `[error] ${ title } ` ) ;
21+ }
2122 return ;
2223 }
23- console . log ( `[${ level } ] ${ data } ` ) ;
24+ if ( data !== undefined ) {
25+ console . log ( `[${ level } ] ${ data } ` ) ;
26+ }
2427 } ,
2528 retryCondition : ( error : any ) => {
2629 if ( error . response && error . response . status === 429 ) {
You can’t perform that action at this time.
0 commit comments