mirror of https://github.com/status-im/metro.git
FBGlobalTransformCache: retry on server-side errors
Reviewed By: cpojer Differential Revision: D5200923 fbshipit-source-id: 9fd0d65e8d663437d27a3837580b07e386f70120
This commit is contained in:
parent
ef7965df63
commit
01ecd43c62
|
@ -288,7 +288,7 @@ class URIBasedGlobalTransformCache {
|
||||||
* There may be other types of error we'd want to retry for, but these are
|
* There may be other types of error we'd want to retry for, but these are
|
||||||
* the ones we experienced the most in practice.
|
* the ones we experienced the most in practice.
|
||||||
*/
|
*/
|
||||||
static shouldRetryAfterThatError(error: Error): boolean {
|
static shouldRetryAfterThatError(error: mixed): boolean {
|
||||||
return (
|
return (
|
||||||
error instanceof FetchError && error.type === 'request-timeout' || (
|
error instanceof FetchError && error.type === 'request-timeout' || (
|
||||||
error instanceof FetchFailedError &&
|
error instanceof FetchFailedError &&
|
||||||
|
|
Loading…
Reference in New Issue