Replies: 1 comment 2 replies
-
How does firebase-js-sdk behave when you execute that code? I think if the function executes "successfully" (returns its own error code perhaps but does not fail for some reason outside of your function code) you have to interpret your own error message as you indicate I believe if it fails for one of these reasons https://firebase.google.com/docs/reference/js/firebase.functions#functionserrorcode - that's when you will go to your catch block in other words I believe there is a separation between "functions in general failed" (goes to catch block) and "your function wants to return an error" (you parse that in try using your own code) But if we are deviating from firebase-js-sdk in some way here we can certainly harmonize, please let us know your findings |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
When calling a function using httpscallable() wrapped inside a try catch, my catch is never called.
On the server I am using the following code.
On the client, catch is never called and the data returned is in the
response.data
object.How can i utilize my catch rather then having to determine the success based on whether or not httpErrorCode exists in my response.data?
Beta Was this translation helpful? Give feedback.
All reactions