#7187: fix(gateway): suppress AbortError during shutdown
cli
Cluster:
Gateway and macOS Improvements
## Summary
Suppress `AbortError` during gateway shutdown to prevent noisy crash logs.
**Problem**: When the gateway shuts down, in-flight HTTP requests throw `AbortError` which propagates as unhandled rejection — fills logs with false-alarm crash reports.
**Fix**: Catch `AbortError` specifically during shutdown and log at debug level instead of crashing.
## Risk Summary
- **Severity**: Low (log noise, not a functional issue)
- **Regression risk**: None — only suppresses errors during shutdown path, normal operation unchanged
- **Scope**: Single file, +32 lines
## Verification
- [x] `pnpm build` passes
- [x] `pnpm lint` passes
- [x] `pnpm test` passes
## Sign-Off
- Models used: Claude Opus 4.6
- Submitter effort: Traced shutdown signal flow through gateway-daemon, verified AbortError detection uses error.name check (works across Node versions), confirmed debug-level log preserves observability
- Agent notes: N/A
lobster-biscuit
Most Similar PRs
#3699: fix(gateway): add error handling for tailscaleCleanup in shutdown
by Episkey-G · 2026-01-29
68.8%
#19391: fix(process): destroy stdio streams on dispose and terminate childr...
by nabbilkhan · 2026-02-17
66.5%
#6143: fix(agents): handle AbortError from activeSession.abort() on timeout
by Glucksberg · 2026-02-01
66.4%
#5334: fix(gateway): support abort as alias for chat.abort to restore /sto...
by njbyte · 2026-01-31
64.9%
#21944: feat(gateway): crash-loop protection with escalating backoff
by Protocol-zero-0 · 2026-02-20
62.9%
#11101: fix: handle AbortError and WebSocket 1006 in unhandled rejection ha...
by Nipurn123 · 2026-02-07
62.1%
#9460: fix(gateway): clean up lock file on service stop
by zenchantlive · 2026-02-05
62.0%
#17243: fix(telegram): catch getFile network failures to prevent gateway cr...
by robbyczgw-cla · 2026-02-15
61.3%
#17758: Fix crash on transient Discord gateway zombie connection errors
by DoyoDia · 2026-02-16
61.3%
#12234: gateway: incident tracking, recover command, and ciao ERR_SERVER_CL...
by levineam · 2026-02-09
61.1%