fix: add error handling to ClaudeService streaming #54

Merged
Snider merged 1 commit from fix/stream-error-handling into main 2026-02-23 11:39:17 +00:00

1 commit

Author SHA1 Message Date
darbs-claude
77e4ae6bad fix: add error handling to ClaudeService streaming (#26)
Some checks failed
CI / PHP 8.3 (pull_request) Failing after 1m53s
CI / PHP 8.4 (pull_request) Failing after 1m52s
Wrap stream() in try/catch to prevent silent failures.
On exception, log the error and yield a structured error event:
  ['type' => 'error', 'message' => string]

Adds tests for connection errors, runtime exceptions, error event
format, and Log::error invocation. Closes ERR-001 in TODO.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-23 11:04:07 +00:00