这是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');
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Issue: Incorrect argument passed to captureException

Reason: The 'true' string is incorrectly passed as a second argument to captureException, which expects only an Error.

Affected dependencies:
• packages/sentry-plugin/src/sentry.service.ts - captureException: Function does not accept a second parameter

Suggestion: Remove the 'true' argument from the captureException call.

Required changes in dependencies:
• packages/sentry-plugin/src/sentry.service.ts - captureException: Update function to handle additional parameters or remove the argument from the call

Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems there is a misunderstanding regarding the captureException method. The suggestion indicates that a new 'flag' parameter has been added, but your comment mentions an incorrect argument being passed as a second argument. Could you please clarify if this issue is related to the new flag parameter or if it's a separate problem? If it's related to the new flag, we need to ensure all calls are updated accordingly. If not, we should address the incorrect argument separately.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems there is a discrepancy between the existing comment and the new suggestion. The previous comment suggests removing an incorrect second argument, while the new suggestion indicates that an additional parameter flag should be added to captureException. Could you clarify whether we should add the flag parameter or remove the existing second argument? If adding the flag, please provide guidance on what value it should have in different contexts.

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) {
if(flag=='true'){
Sentry.captureException(exception);
}
}

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