Files
klz-cables.com/.pnpm-store/v10/files/49/1a0d17537db479395bdb65aa3b893ac1d6a0c9882fabfa9d4bb331b3bd149d2659ad039bd732ede4bd4ad99427fe7738b10441fa013639a47f80207060fbc2
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

1 line
2.2 KiB
Plaintext

{"version":3,"file":"captureRequestError.js","sources":["../../../src/common/captureRequestError.ts"],"sourcesContent":["import type { RequestEventData } from '@sentry/core';\nimport { captureException, headersToDict, withScope } from '@sentry/core';\nimport { flushSafelyWithTimeout, waitUntil } from './utils/responseEnd';\n\ntype RequestInfo = {\n path: string;\n method: string;\n headers: Record<string, string | string[] | undefined>;\n};\n\ntype ErrorContext = {\n routerKind: string; // 'Pages Router' | 'App Router'\n routePath: string;\n routeType: string; // 'render' | 'route' | 'middleware'\n};\n\n/**\n * Reports errors passed to the the Next.js `onRequestError` instrumentation hook.\n */\nexport function captureRequestError(error: unknown, request: RequestInfo, errorContext: ErrorContext): void {\n withScope(scope => {\n scope.setSDKProcessingMetadata({\n normalizedRequest: {\n headers: headersToDict(request.headers),\n method: request.method,\n } satisfies RequestEventData,\n });\n\n scope.setContext('nextjs', {\n request_path: request.path,\n router_kind: errorContext.routerKind,\n router_path: errorContext.routePath,\n route_type: errorContext.routeType,\n });\n\n scope.setTransactionName(errorContext.routePath);\n\n captureException(error, {\n mechanism: {\n handled: false,\n type: 'auto.function.nextjs.on_request_error',\n },\n });\n\n waitUntil(flushSafelyWithTimeout());\n });\n}\n"],"names":[],"mappings":";;;AAgBA;AACA;AACA;AACO,SAAS,mBAAmB,CAAC,KAAK,EAAW,OAAO,EAAe,YAAY,EAAsB;AAC5G,EAAE,SAAS,CAAC,KAAA,IAAS;AACrB,IAAI,KAAK,CAAC,wBAAwB,CAAC;AACnC,MAAM,iBAAiB,EAAE;AACzB,QAAQ,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC;AAC/C,QAAQ,MAAM,EAAE,OAAO,CAAC,MAAM;AAC9B,OAAM;AACN,KAAK,CAAC;;AAEN,IAAI,KAAK,CAAC,UAAU,CAAC,QAAQ,EAAE;AAC/B,MAAM,YAAY,EAAE,OAAO,CAAC,IAAI;AAChC,MAAM,WAAW,EAAE,YAAY,CAAC,UAAU;AAC1C,MAAM,WAAW,EAAE,YAAY,CAAC,SAAS;AACzC,MAAM,UAAU,EAAE,YAAY,CAAC,SAAS;AACxC,KAAK,CAAC;;AAEN,IAAI,KAAK,CAAC,kBAAkB,CAAC,YAAY,CAAC,SAAS,CAAC;;AAEpD,IAAI,gBAAgB,CAAC,KAAK,EAAE;AAC5B,MAAM,SAAS,EAAE;AACjB,QAAQ,OAAO,EAAE,KAAK;AACtB,QAAQ,IAAI,EAAE,uCAAuC;AACrD,OAAO;AACP,KAAK,CAAC;;AAEN,IAAI,SAAS,CAAC,sBAAsB,EAAE,CAAC;AACvC,EAAE,CAAC,CAAC;AACJ;;;;"}