Skip to content

fix(logger): skip Slack POST when webhook URL is empty#4956

Open
droplet-rl wants to merge 1 commit into
masterfrom
droplet/T90K0AL22-C0ADKTEEETA-1781606621-448919
Open

fix(logger): skip Slack POST when webhook URL is empty#4956
droplet-rl wants to merge 1 commit into
masterfrom
droplet/T90K0AL22-C0ADKTEEETA-1781606621-448919

Conversation

@droplet-rl

Copy link
Copy Markdown

What

Adds an early-return in SlackHook.log (packages/logger/src/logger/SlackTransport.ts) so that when an escalation path resolves to an empty / unset webhook URL, the message is dropped silently instead of being POSTed.

const webhookUrl = this.escalationPathWebhookUrls[info.notificationPath] ?? this.defaultWebHookUrl;

// An empty (or unset) webhook URL means this notification path has been intentionally disabled in the config.
// Drop the message silently rather than POSTing to an empty URL, which would otherwise surface as a transport
// error and escalate to PagerDuty.
if (!webhookUrl) return callback();

Why

This is the enabling change for turning off a noisy Slack notification path from config alone (in UMAprotocol/bot-configs) without code changes per-bot.

Without this guard, blanking a webhook URL in SLACK_CONFIG.escalationPathWebhookUrls would just move the failure: the transport would POST to "", axios would throw, the logger would emit an error, and PagerDutyV2Transport would escalate it — exactly the failure mode currently paging on PD incident Q2925Q7EDE9S6W (managed-oo-polygon-monitor, Slack 429s on the optimistic-oracle path).

Behaviour is unchanged when a webhook URL is present.

Companion PR

Config-side change that actually disables the path lives in UMAprotocol/bot-configs (linked in the Slack thread). Merge this one first so the config change is a clean skip rather than an empty-URL POST.

Triggered from Slack by @lee Poettcker.

🤖 Generated with Claude Code

When an escalation path resolves to an empty/unset webhook URL, drop the
log instead of POSTing to an empty URL. This lets a notification path be
disabled from config without generating TransportErrors that escalate to
PagerDuty.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant