if you want a consistent interface to pull localized information out of Error, LocalizedError, and NSError, cast everything to an NSError first. then use localizedFailureReason, localizedDescription, and localizedRecoverySuggestion.
three protocols that help you implement error in swift. LocalizedError: error localization. RecoverableError: to add a behavior to recover from the error. CustomNSError: to define your original NSError properties.