docs: add PR body notes
This commit is contained in:
parent
5dfe2eacc9
commit
5a22326ba4
17
pr-body.md
Normal file
17
pr-body.md
Normal file
@ -0,0 +1,17 @@
|
||||
## Summary
|
||||
Add a JSON config knob to control unhandled promise rejection behavior in the Gateway/CLI.
|
||||
|
||||
## Motivation
|
||||
Transient network errors (e.g., undici `fetch failed`) can currently terminate the gateway when they surface as unhandled promise rejections. Some operators prefer warn-only behavior to avoid missed replies and restarts.
|
||||
|
||||
## Changes
|
||||
- Add `gateway.unhandledRejections: "warn"|"exit"` to config types + zod schema.
|
||||
- Wire config into `installUnhandledRejectionHandler({ mode })` in `src/index.ts` and `src/cli/run-main.ts`.
|
||||
- Extend handler to accept `mode` and skip `process.exit(1)` when `mode="warn"`.
|
||||
|
||||
## Default behavior
|
||||
Unchanged (defaults to `"exit"`).
|
||||
|
||||
## Acceptance criteria
|
||||
- With `gateway.unhandledRejections="warn"`, unhandled rejections are logged but do not terminate the gateway.
|
||||
- With default config, behavior remains unchanged.
|
||||
Loading…
Reference in New Issue
Block a user