I am using the Swift SDK v2 and I want to be able to interpret errors returned when there is no internet connection. So for
files.listFolder
the returned error only contains a description saying "HTTP Error:" without any code or anything else. When I try to switch on HTTPError as suggested here, I am getting the following:
"http error code: nil - message: Optional("") - requestID: nil"
for the following code:
if let error = error {
switch error {
case let .HTTPError(code, message, requestID):
print("http error code: \(code) - message: \(message) - requestID: \(requestID) ")
default:
print("some other error")
}
} else {
print("there was no error")
}