AI & Agent Dev Bug Sandbox logo
AI & Agent Dev Bug Sandbox
Back to Radar

React Query Spam On GitHub Authorization Endpoint Due To Missing Retry: False

useGitHubAuthorizationQuery makes redundant retries (3x by default) for 404 responses because retry: false specified in a FIXME was not implemented.

mediumConfidence 85%ReactStoragePostgreSQL@supabase/supabase-js

Origin Analysis

React Query defaults to retrying failed queries three times. The useGitHubAuthorizationQuery hook does not override this default, so requests that return 404 (e.g., user not authorized) are retried unnecessarily. A FIXME comment already suggested retry: false but it was not applied.
1. Open a page mounting useGitHubAuthorizationQuery, such as the Branching modal or Integrations settings. 2. Ensure the GitHub authorization endpoint returns 404 (e.g., not authorized or endpoint unavailable). 3. Observe network tab: the same request is sent multiple times (initial + 3 retries).

Fixing Code Block

import { useQuery } from '@tanstack/react-query'; export function useGitHubAuthorizationQuery() { return useQuery({ queryKey: ['github-authorization'], queryFn: fetchGitHubAuthorization, retry: false, }); }
Setting retry: false prevents React Query from automatically retrying failed requests, which is appropriate here because 404 is an expected response indicating the user has not authorized GitHub. This stops the redundant network calls.

Edge Case Audit

Disabling retries entirely may cause transient network errors to fail immediately without automatic recovery, potentially degrading UX if the endpoint becomes temporarily unavailable. To mitigate, consider a conditional retry that only retries on non-404 errors (e.g., retry: (failureCount, error) => error.status !== 404). Rollback: revert the change or set retry: 1 if spamming recurs.

Ecosystem Topology

Agent Frameworks

LangChain, LlamaIndex, and Pydantic

  1. highProperty graph relation keys collide when entity IDs or labels contain underscores
  2. highCodeActAgent drops assistant tool-call metadata during handoff, leaving an orphan tool response
  3. high[Bug]: HierarchicalNodeParser async methods return the documents unsplit
  4. highLLM.predict_and_call fails with ValidationError for non-function-calling models when react_chat_formatter is omitted
  5. highAnthropic streaming server-tool input_json_delta overwrites completed client tool_use arguments due to stale cur_tool_call state