fix: stop stuck loading after session run conflict
This commit is contained in:
@@ -50,10 +50,17 @@ test('completed run wins when the direct-chat snapshot is not ready', () => {
|
||||
|
||||
test('only ambiguous transport failures keep the chat streaming', () => {
|
||||
assert.equal(shouldKeepStreamingAfterRunError(0), true);
|
||||
assert.equal(shouldKeepStreamingAfterRunError(409), true);
|
||||
assert.equal(shouldKeepStreamingAfterRunError(409), false);
|
||||
assert.equal(shouldKeepStreamingAfterRunError(503), true);
|
||||
assert.equal(shouldKeepStreamingAfterRunError(400), false);
|
||||
assert.equal(shouldKeepStreamingAfterRunError(undefined), false);
|
||||
assert.equal(
|
||||
shouldKeepStreamingAfterRunError(
|
||||
409,
|
||||
'Session already has an active request. Cancel it first.',
|
||||
),
|
||||
true,
|
||||
);
|
||||
assert.equal(
|
||||
shouldKeepStreamingAfterRunError(
|
||||
undefined,
|
||||
|
||||
Reference in New Issue
Block a user