The error.localizedDescription
is really all you have to work with from the error itself.
Your app can provide a better error message (more user-friendly, localized, etc.) by checking for the error code and providing its own message to the user.
(error as? NSError)?.code