mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-04-09 12:38:14 +00:00
The return value of _send_events_to_backend() was discarded in _initialize_backend_and_send_events, so _finalize_backend_batch was called unconditionally with the full event count even when the send returned 500. This finalized the batch as "completed" on the server while it received 0 events, producing an empty trace URL. Now check the return status and call mark_trace_batch_as_failed on 500, matching the behavior of the regular finalize_batch path.