Answer the question
In order to leave comments, you need to log in
How to handle error code from firebase to js?
Firebase returns an error code such as:
Answer the question
In order to leave comments, you need to log in
Process the server response as usual. Check if the status is !== 200, then throw an error with the values from the response:
According to the error codes, you can add your own error classes to make them more convenient to handle.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question