Closed
Description
Describe the bug
Exceptions in the web implementation are not catchable using the platform interface.
To Reproduce
Steps to reproduce the behavior:
- Create an empty flutter project using master
- Setup firebase_auth and firebase_auth_web following the web package README. (I didn't activate email auth provider to make sure of getting an API error).
- Place a try catch block to catch a possible error using AuthException
- Try to cause the expected error. I tried to authenticate with email and password without activating the email provider to cause ERROR_OPERATION_NOT_ALLOWED.
Expected behavior
I expect the try catch to trigger but it gets ignored. The error is instead reported in the development console as "uncaught in Promise".
Additional context
I'm working on a fix. I will create an "exception mapper" from package:firebase's FirebaseError to AuthException using this reference.
I'm working on the mapping here https://docs.google.com/spreadsheets/d/1VrmcLK3-KF5_DK732XDA0G64wxgiP4W3KvwxeP6Y_DA/edit?usp=sharing