Open Tom3652 opened 2 years ago
This is related; https://github.com/FirebaseExtended/flutterfire/pull/3402#issuecomment-685402151
We had a lot of back and forth on doing enums - the issue is we wrap the native SDKs and simply pass on the error code, so we're not actually 100% sure on what all of those error codes could be, especially given different platforms have different codes.
I'll revive the chat and see if we can implement something at least.
Thanks for the reply @Ehesp and the link, i understand better now this issue. Anyway it would be awesome if something would come up :)
@Tom3652 Can you check if this documentation helps and addresses your issue ?
Yes @darshankawar it answers my needs for the second part of the question, but it's a real work for developers to follow the updates.
It would be much easier for us to deal with enums and let Firebase do internally the mapping when they update the SDKs in my opinion, but would be more work to be done on FlutterFire to test and update the code values when the native SDKs are updated if needed
I would like to be able to catch and respond according to specific errors from
firebase_storage
in my Flutter app.Here is what i would like to do:
For now i saw only 1 line in the documentation :
Saying
e.code == 'canceled'
. Fine, but what are the othersString
we should catch ascode
please ?I think all of the error codes should be added, or an
enum
describing the error state would also be great if possible.