Skip to content

bug: ECS list swallows errors into an empty cluster list (orphaned TODO(#16)) #88

Description

@Bccorb

Problem

fetch_ecs_clusters returns an empty Vec on any error from ListClusters or DescribeClusters, so a denied or throttled ECS call renders as "no clusters" — indistinguishable from a genuinely empty account. This is the exact bug class #17 fixed for every other list fetcher (which now surface ServiceStatus), but ECS was left behind.

Evidence

  • src/aws/ecs.rs:78Err(_) => return vec![] (the ListClusters pagination loop)
  • src/aws/ecs.rs:98Err(_) => return vec![] (the DescribeClusters chunk loop)
  • src/aws/account.rs:42 — the STS get_caller_identity call degrades to an unknown identity with .ok() for the same reason

Both files carry TODO(#16) comments saying "once the error surface exists":

  • src/aws/ecs.rs:71 — "surface throttle/denied errors in the UI instead of degrading to an empty cluster list once the in-UI error surface exists"
  • src/aws/account.rs:41 — "surface a denied/throttled sts:GetCallerIdentity in the UI once the error surface exists"

Why this is untracked

#16 (the in-UI error/notification surface) is closed and was built. So the remaining work these TODOs describe — making ECS and the STS identity fetch actually use that surface — is no longer tracked by any open ticket. The TODOs also now technically violate the AGENTS.md rule that a TODO must reference a ticket: they point at a closed one.

Proposed fix

ECS list fetchers return (Vec<EcsClusterInfo>, ServiceStatus) like the other services, classifying the error via ServiceStatus::from_sdk_error, so the view can show access-denied / unavailable instead of an empty table. Do the same for the STS identity in the account overview. Remove the two stale TODO(#16) comments once done.

Acceptance

  • A denied or throttled ECS fetch surfaces a status rather than rendering as an empty cluster list
  • The STS identity path surfaces a denied/throttled error rather than silently showing an unknown identity
  • No TODO(#16) comments remain (the ticket is closed)

Context

Found during the #38 session while adding ECS test coverage and fixing the ECS capacity placeholders (#43). Unrelated to those changes; pre-existing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium prioritybugSomething isn't workingtech-debtRefactor / maintainability

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions