File tree 1 file changed +8
-3
lines changed 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -3217,7 +3217,7 @@ export type APIErrorResponse = {
3217
3217
export class ErrorFromResponse < T > extends Error {
3218
3218
public code : number | null ;
3219
3219
public status : number ;
3220
- public response : AxiosResponse < T > ;
3220
+ public response : Pick < AxiosResponse < T > , 'data' | 'status' | 'statusText' | 'headers' > ;
3221
3221
3222
3222
constructor (
3223
3223
message : string ,
@@ -3227,13 +3227,18 @@ export class ErrorFromResponse<T> extends Error {
3227
3227
response,
3228
3228
} : {
3229
3229
code : ErrorFromResponse < T > [ 'code' ] ;
3230
- response : ErrorFromResponse < T > [ 'response' ] ;
3230
+ response : AxiosResponse < T > ;
3231
3231
status : ErrorFromResponse < T > [ 'status' ] ;
3232
3232
} ,
3233
3233
) {
3234
3234
super ( message ) ;
3235
3235
this . code = code ;
3236
- this . response = response ;
3236
+ this . response = {
3237
+ data : response . data ,
3238
+ status : response . status ,
3239
+ statusText : response . statusText ,
3240
+ headers : response . headers ,
3241
+ } ;
3237
3242
this . status = status ;
3238
3243
}
3239
3244
}
You can’t perform that action at this time.
0 commit comments