-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
949b209
commit 89220b1
Showing
3 changed files
with
29 additions
and
13 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { NextResponse } from "next/server"; | ||
import * as Sentry from "@sentry/nextjs"; | ||
|
||
import { getSession } from "next-auth/react"; | ||
|
||
export const dynamic = "force-dynamic"; | ||
|
||
export async function GET() { | ||
const session = await getSession(); | ||
|
||
if (session?.user) { | ||
Sentry.setUser({ | ||
email: session.user.email ?? "", | ||
id: session.user.id, | ||
}); | ||
} | ||
|
||
throw new Error("Sentry Example API Route Error"); | ||
return NextResponse.json({ data: "Testing Sentry Error..." }); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters