Commit 4633cb1
committed
fix(server): convert mid-poll task errors and align config-error handling
Addresses review from @bhosmer-ant on #1769:
- handleAutomaticTaskPolling: wrap getTask in try/catch and convert
ProtocolError(InvalidParams) to InternalError when a task vanishes
mid-poll. A task going missing during automatic polling is a
server-side issue — the client didn't request a task.
- handleAutomaticTaskPolling: change plain Error('No task store...') to
ProtocolError(InternalError) for consistency with the analogous
taskSupport config check at L177.
- Update three tests to assert error codes (not just messages) using
toMatchObject, matching the pattern at L1824.
Follow-up (non-blocking): test coverage for the auto-polling output
validation path added in 3f29f35.1 parent 2502215 commit 4633cb1
2 files changed
Lines changed: 28 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
313 | | - | |
| 313 | + | |
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | | - | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
328 | 342 | | |
329 | 343 | | |
330 | 344 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1426 | 1426 | | |
1427 | 1427 | | |
1428 | 1428 | | |
1429 | | - | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
1430 | 1433 | | |
1431 | 1434 | | |
1432 | 1435 | | |
| |||
1548 | 1551 | | |
1549 | 1552 | | |
1550 | 1553 | | |
1551 | | - | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
1552 | 1558 | | |
1553 | 1559 | | |
1554 | 1560 | | |
| |||
6522 | 6528 | | |
6523 | 6529 | | |
6524 | 6530 | | |
6525 | | - | |
| 6531 | + | |
| 6532 | + | |
| 6533 | + | |
| 6534 | + | |
6526 | 6535 | | |
6527 | 6536 | | |
6528 | 6537 | | |
| |||
0 commit comments