Update customFetch implementation in API constants to accept RequestInfo and RequestInit types for improved type safety

This commit is contained in:
Rotimi Best
2026-03-28 19:55:16 +01:00
parent 470b2c6a03
commit d24e501ee7
@@ -7,7 +7,7 @@ export const DEFAULT_CONFIG: Required<ApiClientConfig> = {
timeout: 30000, // 30 seconds
retries: 1,
retryDelay: 1000, // 1 second
customFetch: fetch,
customFetch: (input: RequestInfo | URL, init?: RequestInit) => fetch(input, init),
onAuthError: async () => {
// Default: redirect to login or refresh token
console.warn('Authentication error occurred. Consider redirecting to login.');