firebase-kotlin-sdk
firebase-kotlin-sdk copied to clipboard
FirAuthError exceptions on IOS returning whe whole NSError information
Handling exceptions from Firebase Auth on both android and IOS using this lib works mostly as expected.
On the android side, the exceptions are handled as expected and you can use
try {
// your code here
} catch (e: Exception) {
//e.localizedMessage
}
on IOS, based on the code you create an Exception and pass NSError.toString() instead of NSLocalizedDescription.
Image for reference
Wondering if there's a way of doing the same on the IOS side and having access to the NSError properties itself.
Ideally they should be translated to the corresponding kmp/android exception like we do for js
It is also related to this issue where on iOS the exceptions always have only the most general type FirebaseAuthException and not its corresponding subclass like on android.