Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ref(core): Add mechanism.type to trpcMiddleware errors #17287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
Lms24 wants to merge 3 commits into develop
base: develop
Choose a base branch
Loading
from lms/ref-core-mechanism-trpc
Draft
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion packages/core/src/trpc.ts
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface SentryTrpcMiddlewareArguments<T> {
getRawInput?: () => Promise<unknown>;
}

const trpcCaptureContext = { mechanism: { handled: false, data: { function: 'trpcMiddleware' } } };
const trpcCaptureContext = { mechanism: { handled: false, type: 'auto.rpc.trpc.middleware' } };

function captureIfError(nextResult: unknown): void {
// TODO: Set span status based on what TRPCError was encountered
Expand Down
4 changes: 2 additions & 2 deletions packages/core/test/lib/trpc.test.ts
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe('trpcMiddleware', () => {
});

expect(exports.captureException).toHaveBeenCalledWith(error, {
mechanism: { handled: false, data: { function: 'trpcMiddleware' } },
mechanism: { handled: false, type: 'auto.rpc.trpc.middleware' },
});
});

Expand Down Expand Up @@ -115,7 +115,7 @@ describe('trpcMiddleware', () => {
).rejects.toThrow(error);

expect(exports.captureException).toHaveBeenCalledWith(error, {
mechanism: { handled: false, data: { function: 'trpcMiddleware' } },
mechanism: { handled: false, type: 'auto.rpc.trpc.middleware' },
});
});

Expand Down
Loading

AltStyle によって変換されたページ (->オリジナル) /