Skip to content
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

Store exceptions to be reported later #9601

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jurre
Copy link
Member

@jurre jurre commented Apr 24, 2024

Store exceptions to be reported later. This is useful for things like the message builder which runs in a separate process from the rest of the PR creation.

@Nishnha Nishnha force-pushed the jurre/async-capture-core-errors branch from d3da0b1 to 9aee49d Compare April 24, 2024 18:08
@Nishnha Nishnha changed the title Spike: store exceptions to be reported later Store exceptions to be reported later Apr 24, 2024
@Nishnha Nishnha marked this pull request as ready for review April 24, 2024 18:13
@Nishnha Nishnha requested a review from a team as a code owner April 24, 2024 18:13
Dependabot::ExceptionCapturer.handle_captured_exceptions do |exception|
service.capture_exception(error: exception, tags: tags)
end
service.capture_exception(error: error, tags: tags)
Copy link
Member

Choose a reason for hiding this comment

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

I think we want to put this down below 👇 We're eating the exception in the MessageBuilder so it won't reach this code in the trap.

What might be simpler would be give the ExceptionCapturer the service here (outside of the trap), and have it log to the API immediately when capture_exception is called.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants