-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Google Cloud Functions: Async errors not caught #3695
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
Comments
|
For reference, here is a duplicated issue on this I believe: #3387 @HazAT So if I understand right, if using exports.helloHttp = Sentry.GCPFunction.wrapHttpFunction(async (req, res) => {
try {
const something = await fooBar()
return res.status(200).send()
} catch (error) {
Sentry.captureException(error)
Sentry.flush(1000)
}
}); Basically, we have to do the I didn't find any mention of this in the Sentry documentation and I feel it should be something that people should be informed on before using the Is there any plans to support Promises without any workarounds like this? If yes, how soon can we expect this feature? |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
Package + Version
@sentry/serverless
5.26.0
Description
I just tried using
sentry/serverless
with our Firebase application and can't get it to work at all. One thing that I noticed, which might be considered a bug is that errors thrown from within a promise don't seem to be caught byGCPFunction.wrapHttpFunction
. Errors thrown synchronously are caught (as evident by the stacktrace) but also don't seem to be reported to Sentry in my particular case.Should the
wrapHttpFunction
catch errors thrown from async evaluations? This forum thread indicates that this is a limitation with GCP. If that's still the case I think this limitation should be documented in the documentation (happy to provide a PR).Overall I didn't have the best experience trying this and am a bit at a loss on how do debug this further. Is there a way to initialize Sentry in debug mode to get some additional information?
Thanks
The text was updated successfully, but these errors were encountered: