Skip to content

HTTP 409 responses get the invalid_argument span status in the Actix and Tower integrations #1352

Closed

Description

@RaphaelFakhri

Environment

sentry-actix and sentry-tower (with the http feature), current master (0.49.3).

Steps to reproduce

  1. Use sentry_actix::Sentry or sentry_tower::SentryHttpLayer with transactions enabled.
  2. Return a 409 Conflict response from a handler.

Expected result

The transaction's span status is already_exists, which is what the StatusCode::CONFLICT => SpanStatus::AlreadyExists arm in map_status intends.

Actual result

The span status is invalid_argument. In both sentry-actix/src/lib.rs and sentry-tower/src/http.rs, the CONFLICT arm comes after the status if status.is_client_error() guard, so the guard matches 409 first and the CONFLICT arm is unreachable:

status if status.is_client_error() => protocol::SpanStatus::InvalidArgument,
// ...
StatusCode::CONFLICT => protocol::SpanStatus::AlreadyExists,

Activity

  1. linear-code commented on Oct 18, 2026

    @linear-code
  2. added a commit that references this issue on Oct 20, 2026
    9015a63
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Rust

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions