Skip to content

Google Cloud Functions: Async errors not caught #3695

Closed
@martinklepsch

Description

@martinklepsch

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 by GCPFunction.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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions