Open ben-lotze opened 4 years ago
According to https://nshipster.com/nserror/#nsurlerrordomain-cfnetworkerrors the -1001 on iOS means connection timeout. So, I guess it is safe to take this error code as reliable (as long as it keeps getting forwarded)?
But I cannot find anything about http error -2 on Android.
What is -2? it is magic number! do you have const or enum values?
I have facing same problem. :(
@ben-lotze are you fix this issue?
Is there a documentation about the negative http error codes from
onHttpError.listen
? The goal is to lead to a custom error page on timeouts.I simulated a non responding server by loading
https://www.google.com:81
which will never finish. In this case, the listener receives http error code -2 on Android, and -1001 on iOS.Can I rely on those codes to not change?
Demo code:
Console outputs and behaviour differ depending on the platform:
Android:
Android finishes with a website telling about the timeout:
iOS:
iOS never finishes loading and shows the progress indicator forever.