mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-08-04 14:57:42 +00:00
docs: state the real blast radius of a failed preempt subscription
LibreChat's own entrypoints install a global unhandledRejection handler that logs and keeps serving, so the escaping rejection this guards was never fatal to this server — only to another consumer of @librechat/api that installs no handler. The fix stands either way; the comment just should not overstate what it prevents.
This commit is contained in:
parent
113e785fec
commit
b40aed7cff
1 changed files with 6 additions and 4 deletions
|
|
@ -661,10 +661,12 @@ class GenerationJobManagerClass {
|
|||
*
|
||||
* Never rejects. Every caller fires this without awaiting (see the
|
||||
* createJob registration for why), so a propagating subscription error
|
||||
* would be an unhandled rejection — fatal under Node's default
|
||||
* `--unhandled-rejections=throw`. A failed subscription is not worth a
|
||||
* process: it degrades this generation's preemptive steers to the next
|
||||
* tool boundary, which is the documented fallback.
|
||||
* would surface as an unhandled rejection: an alarming stack trace in
|
||||
* LibreChat's own server, which installs a global handler and keeps
|
||||
* serving, and a dead process for any other consumer of this package,
|
||||
* which under Node's default `--unhandled-rejections=throw` does not.
|
||||
* Neither is warranted — a failed subscription degrades this generation's
|
||||
* preemptive steers to the next tool boundary, the documented fallback.
|
||||
*/
|
||||
private async registerPreemptSubscription(
|
||||
streamId: string,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue