Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/hooks.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ import { handleErrorWithSentry, replayIntegration } from '@sentry/sveltekit';
import * as Sentry from '@sentry/sveltekit';

Sentry.init({
dsn: process.env.SENTRY_DSN,
dsn: 'https://7caab434460a1585f4c87baa1a692427@o40609.ingest.us.sentry.io/4510461147742208',

tracesSampleRate: 1.0,

// Enable logs to be sent to Sentry
enableLogs: true,

environment: process.env.SENTRY_ENVIRONMENT,

// This sets the sample rate to be 10%. You may want this to be 100% while
// in development and sample at a lower rate in production
replaysSessionSampleRate: 0.1,
Expand Down
6 changes: 5 additions & 1 deletion src/instrumentation.server.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import * as Sentry from '@sentry/sveltekit';

Sentry.init({
dsn: process.env.SENTRY_DSN,
dsn: 'https://7caab434460a1585f4c87baa1a692427@o40609.ingest.us.sentry.io/4510461147742208',

integrations: [Sentry.consoleLoggingIntegration({ levels: ['log', 'warn', 'error'] })],

tracesSampleRate: 1.0,

Expand All @@ -13,3 +15,5 @@ Sentry.init({
// uncomment the line below to enable Spotlight (https://spotlightjs.com)
// spotlight: import.meta.env.DEV,
});

export const handleError = Sentry.handleErrorWithSentry();
4 changes: 4 additions & 0 deletions src/routes/auth/callback/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ export async function GET(event) {
const slackProfileResJSON = await slackProfileRes.json();

if (!slackProfileResJSON.ok) {
console.error('Failed to fetch user profile');

const redirectURL = new URL(`${url.protocol}//${url.host}/auth/failed`);
return redirect(302, redirectURL);
}
Expand All @@ -121,6 +123,8 @@ export async function GET(event) {
const channelMembersResJSON = await channelMembersRes.json();

if (!channelMembersResJSON.ok) {
console.error('Failed to fetch channel members');

const redirectURL = new URL(`${url.protocol}//${url.host}/auth/failed`);
return redirect(302, redirectURL);
}
Expand Down
3 changes: 2 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ export default defineConfig({
sentrySvelteKit({
sourceMapsUploadOptions: {
org: 'hack-club',
project: 'construct'
project: 'construct',
authToken: process.env.SENTRY_AUTH_TOKEN
}
}),
tailwindcss(),
Expand Down
Loading