File tree 1 file changed +19
-4
lines changed
1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -1063,11 +1063,26 @@ try {
1063
1063
}
1064
1064
` ` `
1065
1065
1066
- ### Removed exports
1066
+ ### Removed ` options ` from the second argument of ` onResponse ` , ` onSuccess ` , and ` onFailure `
1067
1067
1068
- - ` isResponseError `
1069
- - ` isTimeoutError `
1070
- - ` isAbortError `
1068
+ ` ` ` diff
1069
+ const api = YF.create({
1070
+ - async onFailure(error, options) {
1071
+ - console.log(options.headers)
1072
+ - },
1073
+ + async onFailure(error) {
1074
+ + if (error instanceof YF.ResponseError) {
1075
+ + console.log(error.response.options.headers)
1076
+ + }
1077
+ + },
1078
+ })
1079
+ ` ` `
1080
+
1081
+ ### Removed helpers
1082
+
1083
+ - ` isResponseError ` β ` error instanceof YF.ResponseError `
1084
+ - ` isTimeoutError ` β ` error instanceof YF.TimeoutError `
1085
+ - ` isAbortError ` β ` error instanceof Error && error.name === 'AbortError' `
1071
1086
1072
1087
## π Alternatives
1073
1088
You canβt perform that action at this time.
0 commit comments