0
Fork 0
mirror of https://github.com/mastra-ai/mastra.git synced 2026-11-17 08:44:46 +00:00

fix(client-js): keep retries on read-only observability queries

Sending every POST once also silenced the observability queries that only
read server state. `aggregateTraces`, `aggregateSpans`, `queryTraceThreads`
and `querySpans` travel as POST but never mutate anything, so under the
method-only default a transient 5xx reached the caller immediately and left
every metrics card in an error state that only a person clicking Retry could
clear. The playground-ui metrics tests encode the old contract and fail on
CI for exactly that reason.

Resolve the retry count from the resource for those four queries so they keep
the read default, while an explicit `retries` on the client still wins. The
`@mastra/react` hooks that pin React Query `retry: false` on these endpoints
are comments-accurate again, so nothing there needs to change.

Update the changeset and the two pages that describe per-method retries so
the documented contract matches the behavior.
This commit is contained in:
mastra-platform[bot] 2026-11-15 17:13:30 +00:00
commit 5ba90bf15a
6 changed files with 105 additions and 38 deletions