CKError
Looks like there is another error in the errorUserInfo[NSUnderlyingError]. Try getting the localizedDescription from that error.
So, that would be:
((error as? CKError)?.errorUserInfo[NSUnderlyingErrorKey] as? NSError)?.localizedDescription