File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed 
projects/app/src/service/moduleDispatch/tools Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -130,14 +130,15 @@ export const dispatchHttp468Request = async (props: HttpRequestProps): Promise<H
130130      ...results 
131131    } ; 
132132  }  catch  ( error )  { 
133+     const  err  =  httpRequestErrorResponseData ( error ) 
133134    return  { 
134135      [ ModuleOutputKeyEnum . failed ] : true , 
135136      [ ModuleOutputKeyEnum . responseData ] : { 
136137        totalPoints : 0 , 
137138        params : Object . keys ( params ) . length  >  0  ? params  : undefined , 
138139        body : Object . keys ( requestBody ) . length  >  0  ? requestBody  : undefined , 
139140        headers : Object . keys ( headers ) . length  >  0  ? headers  : undefined , 
140-         httpResult : {  error } 
141+         httpResult : {  error :  err  } 
141142      } 
142143    } ; 
143144  } 
@@ -279,3 +280,21 @@ function removeUndefinedSign(obj: Record<string, any>) {
279280  } 
280281  return  obj ; 
281282} 
283+ function  httpRequestErrorResponseData ( error : any )  { 
284+     try  { 
285+         return  { 
286+             message : error ?. message  ||  undefined , 
287+             name : error ?. name  ||  undefined , 
288+             method : error ?. config ?. method  ||  undefined , 
289+             baseURL : error ?. config ?. baseURL  ||  undefined , 
290+             url : error ?. config ?. url  ||  undefined , 
291+             code : error ?. code  ||  undefined , 
292+             status : error ?. status  ||  undefined 
293+         } 
294+     }  catch  ( error )  { 
295+         return  { 
296+             message : 'Request Failed' , 
297+             name : "AxiosError" , 
298+         } ; 
299+     } 
300+ } 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments