Skip to content

Commit

Permalink
Sentry fixes (#347)
Browse files Browse the repository at this point in the history
  • Loading branch information
N2D4 authored Nov 22, 2024
1 parent aa45434 commit daa2aa1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion apps/dashboard/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { withSentryConfig } from "@sentry/nextjs";
import rehypeKatex from "rehype-katex";
import remarkMath from "remark-math";
import remarkGfm from "remark-gfm";
import remarkHeadingId from "remark-heading-id";
import remarkMath from "remark-math";

import createMDX from "@next/mdx";

Expand Down Expand Up @@ -88,6 +88,9 @@ const nextConfig = {
},
skipTrailingSlashRedirect: true,

experimental: {
instrumentationHook: true,
},

async headers() {
return [
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/src/app/api/[...any]/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import '../../../polyfills';

const handler = async (req: NextRequest) => {
const msg = "Stack Auth's dashboard API is no longer available. Please upgrade the version of your Stack Auth client library, or join our Discord server for assistance: https://discord.stack-auth.com";
console.log(`${req.headers.has('x-stack-project-id') ? `Project ${req.headers.get('x-stack-project-id')}` : "A user"} attempted to access the old dashboard API.`, nicify(req));
console.warn(`${req.headers.has('x-stack-project-id') ? `Project ${req.headers.get('x-stack-project-id')}` : "A user"} attempted to access the old dashboard API.`, nicify(req));
return NextResponse.json({
error: msg,
}, {
Expand Down

0 comments on commit daa2aa1

Please sign in to comment.