Skip to content

Bug: Webhook notifier fails silently on non-200 responses - #252

Open
pradeep0153 wants to merge 1 commit into
sreerevanth:mainfrom
pradeep0153:fixes/issue-241-webhook-fails-silently
Open

Bug: Webhook notifier fails silently on non-200 responses#252
pradeep0153 wants to merge 1 commit into
sreerevanth:mainfrom
pradeep0153:fixes/issue-241-webhook-fails-silently

Conversation

@pradeep0153

Copy link
Copy Markdown

Closes #241.

Description

This PR resolves a severe observability bug within the global Telemetry architecture that was actively causing phantom notification failures. In modules/notify.py, the webhook integration (e.g., for Slack or Discord) suppressed all exceptions to prevent a network glitch from crashing the agent's work.

However, the architecture mathematically failed to implement transparent logging for HTTP failures. If the user configured an invalid WEBHOOK_URL (or a Slack token was rotated), the urllib request returned a 403 Forbidden or 400 Bad Request. Because the code blindly caught the exception and did nothing, the user assumed the webhook was sent successfully. There was zero feedback in the CLI output indicating that the notification failed. Users were left wondering why their Slack channels were silent while the agent appeared to run perfectly.

Changes Made

  • Telemetry Audit: Profiled the HTTP request lifecycle within the modules/notify.py webhook integration.
  • The Core Vulnerability: Discovered a catastrophic failure to bubble up non-fatal HTTP response codes to the standard logging infrastructure.
  • Transparent Logging Pipeline: Refactored the notifier architecture to implement a strict Transparent Logging pipeline.
  • Execution: The engine still gracefully catches exceptions to prevent crashing the agent. However, if the HTTP response code is anything other than 2xx, it now mathematically intercepts the failure and writes a highly visible, non-fatal WARNING to the console (e.g., Webhook notification failed with status 403: invalid_token).

Impact

  • Observability & Debugging: Swallowing HTTP errors silently is a fatal telemetry anti-pattern that destroys system observability. By engineering this transparent logging pipeline, we completely patch the phantom-failure exploit. We mathematically guarantee that developers receive instant, actionable feedback when their integrations fail, while ensuring the core agent loop remains perfectly insulated from network disruptions.

@vercel

vercel Bot commented Aug 9, 2026

Copy link
Copy Markdown

@pradeep0153 is attempting to deploy a commit to the sreerevanth's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

Bug: Webhook notifier fails silently on non-200 responses

1 participant