feat(functions): Add more details to FunctionsError#9942
Conversation
🦋 Changeset detectedLatest commit: 0131a85 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Code Review
This pull request enhances FunctionsError by including the HTTP status code in the error message and adding url and details fields to customData. It updates the error handling logic in _errorForResponse and ensures the request URL is propagated through the error reporting chain. Feedback was provided regarding the FunctionsError constructor, specifically noting that direct assignment to customData might violate readonly constraints and that the current falsy check for details could skip valid values like 0 or false. It is recommended to pass the customData object directly to the super call instead.
Changeset File Check ✅
|
Functions errors historically have not have a lot of detail which makes debugging difficult. We can't provide much more detail when it comes to network errors and native API "fetch errors", since they don't provide us with much information, but I am adding what we can.
urlstring in thecustomDatafield (customDatais standard in allFirebaseErrorobjects). This may help debug a nonexistent function name or region, for example.Fixes #9807