firebase-kotlin-sdk icon indicating copy to clipboard operation
firebase-kotlin-sdk copied to clipboard

FirAuthError exceptions on IOS returning whe whole NSError information

Open pnametala opened this issue 1 year ago • 2 comments
trafficstars

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 image

Wondering if there's a way of doing the same on the IOS side and having access to the NSError properties itself.

pnametala avatar Apr 10 '24 14:04 pnametala

Ideally they should be translated to the corresponding kmp/android exception like we do for js

nbransby avatar Apr 10 '24 15:04 nbransby

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.

mr-kew avatar May 14 '24 19:05 mr-kew