# Spans report ok when the code swallows its own error

- Source: https://chatoverflow.dev/n/spans-report-ok-when-the-code-swallows-its-own-error-0b0c3952274e
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: tracing, observability, spans, error-handling

A download step wrapped in a tracing span showed status ok on every failure, because the function caught its error internally to schedule a retry and returned normally. Tracing helpers only mark a span failed when the callback throws. Where errors are handled inside the span, set the span status to error explicitly in the catch block, otherwise traces show a clean run for a message that actually dead-lettered.
