mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
Upgrade Sentry
This commit is contained in:
parent
5ffdfd067f
commit
32e32d502a
@ -43,7 +43,7 @@
|
||||
"@opentelemetry/semantic-conventions": "^1.27.0",
|
||||
"@prisma/client": "^5.9.1",
|
||||
"@prisma/instrumentation": "^5.19.1",
|
||||
"@sentry/nextjs": "^7.105.0",
|
||||
"@sentry/nextjs": "^8.40.0",
|
||||
"@simplewebauthn/server": "^11.0.0",
|
||||
"@stackframe/stack-emails": "workspace:*",
|
||||
"@stackframe/stack-shared": "workspace:*",
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
import { createSmartRouteHandler } from "@/route-handlers/smart-route-handler";
|
||||
import { yupNumber, yupObject, yupString } from "@stackframe/stack-shared/dist/schema-fields";
|
||||
import { StackAssertionError } from "@stackframe/stack-shared/dist/utils/errors";
|
||||
|
||||
export const GET = createSmartRouteHandler({
|
||||
request: yupObject({}),
|
||||
response: yupObject({
|
||||
statusCode: yupNumber().oneOf([200]).defined(),
|
||||
bodyType: yupString().oneOf(["success"]).defined(),
|
||||
}),
|
||||
handler: async (req) => {
|
||||
throw new StackAssertionError(`Server debug error thrown successfully! ${Math.random()}`);
|
||||
},
|
||||
});
|
||||
14
apps/backend/src/app/health/error-handler-debug/page.tsx
Normal file
14
apps/backend/src/app/health/error-handler-debug/page.tsx
Normal file
@ -0,0 +1,14 @@
|
||||
"use client";
|
||||
|
||||
import { throwErr } from "@stackframe/stack-shared/dist/utils/errors";
|
||||
|
||||
export default function Page() {
|
||||
return <div>
|
||||
This page is useful for testing error handling.<br />
|
||||
Your observability platform should pick up on the errors thrown below.<br />
|
||||
<button onClick={() => throwErr(`Client debug error thrown successfully! ${Math.random()}`)}>Throw client error</button>
|
||||
<button onClick={() => {
|
||||
console.log("Endpoint request", fetch("/health/error-handler-debug/endpoint"));
|
||||
}}>Throw server error</button>
|
||||
</div>;
|
||||
}
|
||||
@ -23,7 +23,7 @@
|
||||
"@next/mdx": "^14",
|
||||
"@node-oauth/oauth2-server": "^5.1.0",
|
||||
"@radix-ui/react-icons": "^1.3.1",
|
||||
"@sentry/nextjs": "^7.105.0",
|
||||
"@sentry/nextjs": "^8.40.0",
|
||||
"@stackframe/stack": "workspace:*",
|
||||
"@stackframe/stack-emails": "workspace:*",
|
||||
"@stackframe/stack-shared": "workspace:*",
|
||||
|
||||
@ -0,0 +1,5 @@
|
||||
import { StackAssertionError } from "@stackframe/stack-shared/dist/utils/errors";
|
||||
|
||||
export function GET() {
|
||||
throw new StackAssertionError(`Server debug error thrown successfully! ${Math.random()}`);
|
||||
}
|
||||
15
apps/dashboard/src/app/health/error-handler-debug/page.tsx
Normal file
15
apps/dashboard/src/app/health/error-handler-debug/page.tsx
Normal file
@ -0,0 +1,15 @@
|
||||
"use client";
|
||||
|
||||
import { throwErr } from "@stackframe/stack-shared/dist/utils/errors";
|
||||
import { Button } from "@stackframe/stack-ui";
|
||||
|
||||
export default function Page() {
|
||||
return <div>
|
||||
This page is useful for testing error handling.<br />
|
||||
Your observability platform should pick up on the errors thrown below.<br />
|
||||
<Button onClick={() => throwErr(`Client debug error thrown successfully! ${Math.random()}`)}>Throw client error</Button>
|
||||
<Button onClick={async () => {
|
||||
console.log("Endpoint response", await fetch("/health/error-handler-debug/endpoint"));
|
||||
}}>Throw server error</Button>
|
||||
</div>;
|
||||
}
|
||||
1016
pnpm-lock.yaml
1016
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user