flutterfire
flutterfire copied to clipboard
[π]Holistically document all throwed exception codes.
Use case
I use FirebaseFunctions and FirebaseAuth. I want to catch FirebaseException and show AlertDialog with special localized alert message, depending on what code is provided.
Problem
I can't find complete exception code list. firebase_auth.dart has scant lists before methods, but firebase_functions.dart hasn't them at all. FlutterFire Docs mentions about only few individual codes. Firebase has something looks like i want, but for Admin SDK (https://firebase.google.com/docs/auth/admin/errors). Is there the a similar list for FlutterFire?
Proposal
Holistically document all throwed exception codes.
I agree that a list is neccesary. But not only for auth and functions, but for all plugins which may throw exceptions with errorcodes.
In the meantime i have found them available in the class documentation :

@Tom3652, as mentioned in issue:
...firebase_auth.dart has scant lists before methods...
Also, firebase_auth.dart generates some codes, which haven't been described in docs. Like unknown, network-request-failed. Thus, be careful.
Ah !
You are right thanks, feel stupid i have not read well enough..
Hopefully this will be available soon and kept up-to-date, because making conditional statements with strings that can change can be dangerous.
Hi, any updated on this? Is there a list somewhere where I can find the list of error codes? That would be awesome, thanks in advance.
I've been struggling to find them and I only find documentation related to other languages libraries.
@Ehesp @Salakar Sorry for disturbing but do you know where to find the error codes? It's a bit of a headache going trough all of the code tying to dig them
@julio-lagos-imatia Not sure if this is still useful but I usually parse through these error codes: https://firebase.google.com/docs/auth/admin/errors
Three years on and still no published list of errorCodes. Horrendous.
Hi, can someone please response and resolve this query.