mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-07 21:07:46 +00:00
[api] Add Sentry (#3597)
* [api] Add Sentry * Use function name * Add test error * Revert "Add test error" This reverts commit 39cf8a61dad9fcdcb616e418a0deb6ffe9e04ea9. * Revert "Revert "Add test error"" This reverts commit c718f201da9d80743319ac87e0d4560e718fff53. * Add logging * Revert "Add logging" This reverts commit 39cd46c8bbeef9024e71fe70478068480a51545b. * Revert "Revert "Revert "Add test error""" This reverts commit e6f63ee21fabb4ac8fc065b74281dbcdf5811216. * Ignore .env * Use init function for Sentry inline
This commit is contained in:
9
api/_lib/util/assert-env.ts
Normal file
9
api/_lib/util/assert-env.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export function assertEnv(name: string) {
|
||||
const value = process.env[name];
|
||||
|
||||
if (!value) {
|
||||
throw new Error(`Missing env "${name}"`);
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
Reference in New Issue
Block a user