You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// api/instance.ts
import ky, { type BeforeRequestHook, type BeforeRetryHook } from 'ky'
const beforeRetryHook: BeforeRetryHook = ({
request,
options,
error,
retryCount,
}) => {
console.log('test', error) // This error is not being logged
}
const api = ky.create({
prefixUrl: 'https://api.example.com',
headers: {
'Content-Type': 'application/json',
},
hooks: {
beforeRetry: [beforeRetryHook],
},
})
// Using with React Query
// provider/QueryProvider.tsx
const queryClient = new QueryClient({
defaultOptions: {
queries: {},
mutations: {},
},
})
I'm experiencing an issue where the error parameter in the beforeRetry hook is not being logged to the console. I'm using ky with React Query in a React Native (Expo) application.
The text was updated successfully, but these errors were encountered:
I'm experiencing an issue where the error parameter in the beforeRetry hook is not being logged to the console. I'm using ky with React Query in a React Native (Expo) application.
The text was updated successfully, but these errors were encountered: