flutterfire icon indicating copy to clipboard operation
flutterfire copied to clipboard

[πŸ“š]Holistically document all throwed exception codes.

Open ChaserVasya opened this issue 4 years ago β€’ 9 comments

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.

ChaserVasya avatar Jun 06 '21 05:06 ChaserVasya

I agree that a list is neccesary. But not only for auth and functions, but for all plugins which may throw exceptions with errorcodes.

sjoerd0301 avatar Aug 05 '21 08:08 sjoerd0301

In the meantime i have found them available in the class documentation :

Capture d’écran 2021-09-09 aΜ€ 12 52 23

Tom3652 avatar Sep 09 '21 11:09 Tom3652

@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.

ChaserVasya avatar Sep 09 '21 11:09 ChaserVasya

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.

Tom3652 avatar Sep 09 '21 12:09 Tom3652

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.

julio-lagos-imatia avatar Apr 05 '22 06:04 julio-lagos-imatia

@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 avatar Apr 05 '22 10:04 julio-lagos-imatia

@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

cgalo avatar Apr 25 '23 22:04 cgalo

Three years on and still no published list of errorCodes. Horrendous.

nathanmckean avatar Dec 05 '24 00:12 nathanmckean

Hi, can someone please response and resolve this query.

Thembelani-M avatar Apr 29 '25 09:04 Thembelani-M