← Back to PRs

#22371: fix(googlechat): log webhook target resolution failures

by AIflow-Labs open 2026-02-21 02:46 View on GitHub →
channel: googlechat size: S
## what changed - In `extensions/googlechat/src/monitor.ts`, log Google Chat webhook selection failures only once per error path using the first target in scope, preserving existing status/error text. - Keep existing 401 behavior for: - no verified target (`unauthorized`) - multiple verified targets (`ambiguous webhook target`) - Preserve existing response payloads; only diagnostic logging is adjusted to avoid per-target duplicate entries. ## why this fixes the issue When webhook verification fails for Google Chat requests, logs were emitted once per configured target, causing noisy and duplicated output during ambiguous/no-target cases. Reporting a single diagnostic target now keeps signal clean and makes failures (`ambiguous` / `no verified webhook target`) easier to identify without changing runtime behavior. ## tests - `pnpm check` - `pnpm test` - `pnpm canvas:a2ui:bundle` - `bunx vitest run --config vitest.unit.config.ts` - `pnpm vitest run extensions/googlechat/src/monitor.webhook-routing.test.ts extensions/msteams/src/messenger.test.ts src/discord/monitor/message-handler.process.test.ts` ## edge cases - Existing unauthorized and ambiguous 401 responses remain unchanged. - No schema/transport behavior changes; only error logging flow is deduplicated. ## unresolved infra-level noise (non-blockers) - Some tests intentionally log transient service fallbacks (e.g., retry/backoff and gateway retry messages) while still passing assertions. These are environment-dependent warnings, not test failures.

Most Similar PRs