forked from mirrors/pronouns.cc
fix: don't require a valid sentry dsn for the frontend
This commit is contained in:
parent
55479ae8da
commit
1339550c80
2 changed files with 4 additions and 2 deletions
|
@ -3,7 +3,7 @@ steps:
|
||||||
image: node
|
image: node
|
||||||
directory: frontend
|
directory: frontend
|
||||||
environment: # SvelteKit expects these in the environment during build time.
|
environment: # SvelteKit expects these in the environment during build time.
|
||||||
- PRIVATE_SENTRY_DSN=non_existent_dsn
|
- PRIVATE_SENTRY_DSN=
|
||||||
- PUBLIC_BASE_URL=http://pronouns.localhost
|
- PUBLIC_BASE_URL=http://pronouns.localhost
|
||||||
- PUBLIC_MEDIA_URL=http://pronouns.localhost/media
|
- PUBLIC_MEDIA_URL=http://pronouns.localhost/media
|
||||||
- PUBLIC_SHORT_BASE=http://prns.localhost
|
- PUBLIC_SHORT_BASE=http://prns.localhost
|
||||||
|
|
|
@ -2,7 +2,9 @@ import { PRIVATE_SENTRY_DSN } from "$env/static/private";
|
||||||
import * as Sentry from "@sentry/node";
|
import * as Sentry from "@sentry/node";
|
||||||
import type { HandleServerError } from "@sveltejs/kit";
|
import type { HandleServerError } from "@sveltejs/kit";
|
||||||
|
|
||||||
|
if (PRIVATE_SENTRY_DSN) {
|
||||||
Sentry.init({ dsn: PRIVATE_SENTRY_DSN });
|
Sentry.init({ dsn: PRIVATE_SENTRY_DSN });
|
||||||
|
}
|
||||||
|
|
||||||
export const handleError = (({ error, event }) => {
|
export const handleError = (({ error, event }) => {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
|
Loading…
Reference in a new issue