envoyproxy / envoyproxy/envoy-mobile
ios/android: expose connectivity errors via EnvoyError enumerated code
Open
help wanted
no stalebot
platform/android
platform/ios
- Dominant language
- Java
- Stars
- 566
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
When requests time out due to network connectivity or being offline entirely, Envoy Mobile currently calls `onError` with an `EnvoyError` containing a `0` status code and `upstream request timeout` message.
In order to better communicate _which error_ occurred to end consumers, we can replace the `code` with an enumeration containing human-readable error reasons.
For example:
```swift
enum EnvoyErrorCode: Int {
case unknown = 0
case upstreamTimeout = 1
case dnsFailure = 2
...
}
```
Contributor guide
Assessment
This issue has not been assessed yet.