Skip to content

Instantly share code, notes, and snippets.

View JFGHT's full-sized avatar
🚀
Conquering the void.

JFGHT

🚀
Conquering the void.
View GitHub Profile
@JFGHT
JFGHT / sentry-serverless-firebase.ts
Created December 29, 2023 14:26 — forked from zanona/sentry-serverless-firebase.ts
Missing Sentry's firebase serverless wrappers
/**
* Temporary wrapper for firebase functions until @sentry/serverless support is implemented
* It currently supports wrapping https, pubsub and firestore handlers.
* usage: https.onRequest(wrap((req, res) => {...}))
* Updated by JFGHT 29/12/2023
* Taken from https://gist.github.com/zanona/0f3d42093eaa8ac5c33286cc7eca1166
*/
import type { Event } from '@sentry/types';
import type { https } from 'firebase-functions';
import type { onRequest, onCall } from 'firebase-functions/lib/providers/https';