这是indexloc提供的服务,不要输入任何密码
Skip to content
Open
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/sentry-plugin/src/sentry.filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class SentryExceptionsFilter extends ExceptionLoggerFilter {
if (variables) {
setContext('GraphQL Error Variables', variables);
}
this.sentryService.captureException(exception);
this.sentryService.captureException(exception,'true');
}
return super.catch(exception, host);
}
Expand Down
6 changes: 4 additions & 2 deletions packages/sentry-plugin/src/sentry.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ export class SentryService implements OnApplicationBootstrap, OnApplicationShutd
return Sentry.close();
}

captureException(exception: Error) {
Sentry.captureException(exception);
captureException(exception: Error,flag: any) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Issue: New flag parameter in captureException method

Reason: The captureException method now includes a new 'flag' parameter that conditionally calls Sentry.captureException.

Affected dependencies:
• packages/sentry-plugin/src/sentry.service.ts - captureException: Method now requires an additional parameter that may affect existing calls

Suggestion: Ensure all callers of captureException provide the new 'flag' parameter. Consider using a boolean type for the flag instead of any.

Required changes in dependencies:
• packages/sentry-plugin/src/sentry.service.ts - captureException: Update all instances where captureException is called to include the new flag parameter.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Issue: The captureException function now includes an additional parameter flag, which affects how exceptions are captured.

Reason: Adding a new parameter changes the method signature, requiring all dependent files to update their calls to this function. If they do not provide the new parameter, it will result in a runtime error or unexpected behavior.

Affected dependencies:
• packages/sentry-plugin/src/sentry-error-handler-strategy.ts - captureException: The function call to captureException does not include the new flag parameter.
• packages/sentry-plugin/src/sentry.filter.ts - captureException: The function call to captureException does not include the new flag parameter.
• packages/sentry-plugin/src/api/admin-test.resolver.ts - captureException: The function call to captureException does not include the new flag parameter.

Suggestion: Check all instances where captureException is called and ensure that the new flag parameter is provided. Verify if the logic of these calls should now depend on the flag parameter.

Required changes in dependencies:
• packages/sentry-plugin/src/sentry-error-handler-strategy.ts - captureException: Update all calls to captureException in this file by adding the flag parameter. Determine an appropriate value for flag based on the context of these calls.
• packages/sentry-plugin/src/sentry.filter.ts - captureException: Update all calls to captureException in this file by adding the flag parameter. Determine an appropriate value for flag based on the context of these calls.
• packages/sentry-plugin/src/api/admin-test.resolver.ts - captureException: Update all calls to captureException in this file by adding the flag parameter. Determine an appropriate value for flag based on the context of these calls.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Suggested change
captureException(exception: Error,flag: any) {
captureException(exception: Error,flag: any) {

Copy link
Owner Author

Choose a reason for hiding this comment

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

Suggested change
captureException(exception: Error,flag: any) {
captureException(exception: Error,flag: any) {

hey i am yashwanth

if(flag=='true'){
Sentry.captureException(exception);
}
}

captureMessage(message: string, captureContext?: CaptureContext) {
Expand Down