[cloud_functions] How to get Firebase Functions error Object ? #7055
Unanswered
LeonanFragaLeonardo
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
Context:
My question concerns about how to handle with API error response when using cloud_functions to perform FirebaseFunctions calls.
I'm using cloud_functions v3.0.3 to make some Http requests via Firebase Http Functions.
Usage:
My requests are made by using the following code:
Everything works fine when response is 2xx. (I didn't test with 1xx or 3xx)
But:
When my API returns an error (4xx or 5xx), I can't get the error object.
The FirebaseFunctionsException gives me an object like this:
As we can see, there is no property that I can use to get the error from my API.
My API returns this:
Main Question
Is there an way to get the API error response by using callable.call returns from FirebaseFunctionsException ?
Beta Was this translation helpful? Give feedback.
All reactions