fix(logger): skip Slack POST when webhook URL is empty#4956
Open
droplet-rl wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.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.escalationPathWebhookUrlswould just move the failure: the transport would POST to"", axios would throw, the logger would emit anerror, andPagerDutyV2Transportwould escalate it — exactly the failure mode currently paging on PD incident Q2925Q7EDE9S6W (managed-oo-polygon-monitor, Slack429s on theoptimistic-oraclepath).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