Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ test('Should record exceptions and transactions for faulty route handlers', asyn

expect(routehandlerError.exception?.values?.[0].value).toBe('route-handler-error');

expect(routehandlerError.request?.method).toBe('PUT');
expect(routehandlerError.request?.url).toContain('/route-handlers/[param]/error');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think what we really need here is the unparameterized url. Which is a major pain in the butt to grab in Next.js because it turns static routes dynamic 🤔 Let me sit on this a bit.


expect(routehandlerError.transaction).toBe('PUT /route-handlers/[param]/error');
});

Expand Down
2 changes: 2 additions & 0 deletions packages/nextjs/src/common/wrapRouteHandlerWithSentry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export function wrapRouteHandlerWithSentry<F extends (...args: any[]) => any>(

isolationScope.setSDKProcessingMetadata({
request: {
url: parameterizedRoute,
method,
headers: completeHeadersDict,
},
});
Expand Down
Loading