feat: add sentry report wrapper to every api route in appDir (#19966)
* update oauth tests * fix parseRequestData * add logging * add fallback * use ?? * updates * use parseUrlFormData in saml/callback * update tests * fix * remove log * update * any -> unknown * use HttpErrors * addressed * unknown -> any * feat: Add entry report wrapper to every api route in appDir * fix * fix unit test * fix
This commit is contained in:
1 parent
1e9f3a8060
commit
87bc8d649a
49 files changed
+180
-76
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { defaultResponderForAppDir } from "app/api/defaultResponderForAppDir";
|
||||
import { cookies, headers } from "next/headers";
|
||||
import { NextResponse } from "next/server";
|
||||
import crypto from "node:crypto";
|
||||
@@ -6,7 +7,7 @@ import { getServerSession } from "@calcom/features/auth/lib/getServerSession";
|
||||
|
||||
import { buildLegacyRequest } from "@lib/buildLegacyCtx";
|
||||
|
||||
export async function GET() {
|
||||
async function getHandler() {
|
||||
const headersList = headers();
|
||||
const cookiesList = cookies();
|
||||
const legacyReq = buildLegacyRequest(headersList, cookiesList);
|
||||
@@ -28,3 +29,5 @@ export async function GET() {
|
||||
|
||||
return NextResponse.json({ hash });
|
||||
}
|
||||
|
||||
export const GET = defaultResponderForAppDir(getHandler);
|
||||
Reference in new issue
Block a user