Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const isNetworkErrorOrRouterTimeout = (e: any) => {
if (isNetworkOrIdempotentRequestError(e)) {
printLabel(e, 'Retry from network error')
return true
}
if (e && isSafeRequestError(e) && e.response && e.response.data && e.response.data.code === TIMEOUT_CODE) {
printLabel(e, 'Retry from timeout')
return true
}
return false
}