Skip to content

Conversation

trag1c
Copy link
Member

@trag1c trag1c commented Sep 2, 2025

Since the Monalisten task is not handled by discord.py, any exception that happens in there is dropped. There were several cases already where the bot stopped the webhook feed with no reported error on Sentry. This fixes that. The reraise_with_payload ctx manager is not ideal and is something I'd like to be part of Monalisten (which currently only handles errors related to the received event).

@trag1c trag1c requested a review from Copilot September 2, 2025 20:14
@trag1c trag1c added internal Tooling and non-user-facing improvements area: webhooks labels Sep 2, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds comprehensive error handling to webhook processing by implementing task error handling for the Monalisten client and payload context managers for individual webhook events. The changes ensure exceptions in webhook processing are properly captured and reported to Sentry instead of being silently dropped.

  • Adds task-level error handling with callback for the Monalisten background task
  • Implements payload context managers to preserve event data when exceptions occur
  • Enhances error logging to include exception notes

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
app/core.py Adds task error handling infrastructure and enhances error logging
app/components/github_integration/webhooks/core.py Implements reraise_with_payload context manager and error forwarding
app/components/github_integration/webhooks/prs.py Wraps PR webhook handlers with payload context
app/components/github_integration/webhooks/issues.py Wraps issue webhook handlers with payload context
app/components/github_integration/webhooks/discussions.py Wraps discussion webhook handlers with payload context

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@trag1c trag1c merged commit cdbba90 into ghostty-org:main Sep 2, 2025
1 check passed
@trag1c trag1c deleted the push-otzqryyzyuyw branch September 2, 2025 20:18
Copy link

sentry-io bot commented Sep 4, 2025

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

Did you find this useful? React with a 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: webhooks internal Tooling and non-user-facing improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant