I'm using Firebase storage with flutter. If the upload operation fails for whatever reason (e.g. exceeds size limits set in console), it causes a StorageException.
I want to do something like this:
try {
final uploadTask = ref.putFile(docFile);
taskSnapshot = await uploadTask.onComplete;
} on StorageException catch (err) {
// Do something
}
But there isn't any StorageException type and I can't find a way to catch any and all exceptions. Any ideas?