Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation on returned error messages #38

Open
frankhuurman opened this issue Sep 20, 2021 · 0 comments
Open

Documentation on returned error messages #38

frankhuurman opened this issue Sep 20, 2021 · 0 comments

Comments

@frankhuurman
Copy link

Hi there,

I've been using pyrebase4 for some time and was digging through the pyrebase documentation and the docs on the firebase website but haven't been able to find a list of possible error messages that could be returned.

Take this example for instance:

try:
      result = self.auth.sign_in_with_email_and_password(email, password)
except requests.HTTPError as e:
      error_json = e.args[1]
      error = json.loads(error_json)['error']['message']
      if error == "INVALID_PASSWORD":
          print("Password is invalid")
      if error == "EMAIL_NOT_VALID":
          print("No account found with this e-mail")

I had to find out by entering a wrong password that the error message "INVALID_PASSWORD" is returned and did another request with a non existing e-mail address to receive "EMAIL_NOT_VALID".
If anyone could steer me in the direction of a list of these returned values per auth function then it would save me a lot of time trying out all kinds of requests to see what exact error message gets returned to write exceptions for them. Putting these in the Pyrebase docs would be massively helpful as well! 😄

Thanks in advance.

Make sure these boxes are checked before submitting your issue:

[x] Check that your version of Python is 3.4+
[x] Check that you are on the newest version of Pyrebase
[x] Check that Email/password provider is enabled in your Firebase dashboard under Auth -> Sign In Method.

Please don't be discouraged if you do not get a response to your issue quickly,
I maintain Pyrebase for fun and don't always have as much free time as I'd like.

Thank you for helping make Pyrebase better!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant