How to do error handling when SDK does not expose custom errors?
When there is no network connection, ZendeskSDK throws something like this:
ZendeskSDK.ZendeskError.failedToInitialize(error: Optional(ZendeskSDKHTTPClient.HTTPError.requestFailed(error: Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." UserInfo=
As you can see, this is a custom error containing another custom error which in turn contains an underlying error. The problem – these errors are not exposed by the sdk, meaning that developers are not able to write code which would check, for example, if the issue was caused by the network error or something else.
1) Why would Zendesk developers not expose errors to developers? This is literally the first time I see anything like this in the SDK
2) How on earth are we supposed to parse these?
