Skip to content

/teams/me/usage non-2xx flood: 500 (TAURI-RUST-BSF) + 404 (TAURI-RUST-8C) — RCA gated on #4058 host telemetry #4153

Closed

Description

@oxoxDev

Source

Sentry self-hosted (tinyhumans / tauri-rust):

  • TAURI-RUST-BSF — GET /teams/me/usage failed (500 Internal Server Error); response_body_len=0 — 2063 events · 24 users · first seen 2026-06-09 · last seen 2026-06-25 · ongoing.
  • TAURI-RUST-8C — GET /teams/me/usage failed (404 Not Found); response_body_len=91 — 12,424 events · 1 user · ongoing.

Sibling of TAURI-RUST-8WY (401, already classified as session-expiry and suppressed via #3297/#3384).

Why this is blocked (not yet fixable)

Both issues fire from team_get_usage at src/core/jsonrpc.rs:171 (report_error_or_expected). The 500/404 are not session-expiry and not matched by is_transient_message_failure, so they land in the reported else arm — correct given current signal.

We are blind on origin:

  • The canonical Node backend (backend-nodejs Sentry project) has no matching /teams/me/usage 500. A 500 with an empty body is not what the Node app emits (it returns a JSON error body) — it points at a gateway / proxy / non-canonical (foreign) BACKEND_URL, the same theory as 8C's 91-byte non-canonical 404.
  • feat(api): capture host + body snippet on backend_api non-2xx (#4055) #4058 (merged 2026-06-25) added the missing host + body_preview tags to the authed_json non-2xx arm — but it has not reached a shipped release yet, so current BSF/8C events still lack those tags. Until a build with feat(api): capture host + body snippet on backend_api non-2xx (#4055) #4058 ships, we cannot confirm foreign-host vs canonical-backend defect, and therefore cannot bucket per the RCA-vs-suppress gate.

This issue exists so the deferred follow-up #4058 promised does not rot (it was never opened because the telemetry hasn't shipped).

Plan (gated)

  1. Wait for a release carrying feat(api): capture host + body snippet on backend_api non-2xx (#4055) #4058, then re-pull BSF + 8C events for host + body_preview.
  2. Bucket each (real backend defect vs genuinely-unpreventable foreign-host):
    • Foreign host / gateway 5xx with empty body and zero local lever → demote via is_transient_message_failure (or an explicit expected arm), and say so + why.
    • Canonical backend 500 → fix the backend (tinyhumansai/backend), not the client.
  3. Flood-prevention (host-agnostic, ships regardless of bucket): add backoff on repeated team_get_usage failures so a persistent non-2xx does not re-fire on every poll / managed-tool budget probe. Backpressure, not silent drop — the first failure still reports.

Bug shape

Backend non-2xx on /teams/me/usage budget/usage probe; empty/short body; high-volume re-fire from polling + budget-gate re-probe (managed_tool_budget_exhausted does not negative-cache failed probes).

Related

Metadata

Metadata

Assignees

Labels

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions