I'm trying to check what exact error a request might throw by doing some custom checks and throw my own custom errors.
if let cause = resource.latestError?.cause {
if case RequestError.Cause.RequestCancelled = cause {
}
}
I get this error:
Argument type 'RequestError.Cause.RequestCancelled.Type' does not conform to expected type '_ErrorCodeProtocol'
Any ideas how I could check what the exact cause of the error is and then return my own custom errors?