different-ai/openwork · error

Failed to load the OAuth client (${response.status}).

Error message

Failed to load the OAuth client (${response.status}).

What it means

Error "Failed to load the OAuth client (${response.status})." thrown in different-ai/openwork.

Source

Thrown at ee/apps/den-web/app/(den)/dashboard/_components/mcp-connections-data.tsx:1074

}

export function useNativeProviderClient(providerId: string, enabled: boolean) {
  const { orgId, runReauthableAction } = useOrgDashboard();

  return useQuery({
    enabled: enabled && Boolean(orgId),
    queryKey: mcpConnectionQueryKeys.nativeProviderClient(orgId, providerId),
    retry: false,
    queryFn: async (): Promise<NativeProviderClient> => {
      let client: NativeProviderClient | null = null;
      await runReauthableAction("load-native-oauth-client", async () => {
        const { response, payload } = await requestJson(
          `/v1/oauth-providers/${encodeURIComponent(providerId)}/client`,
          { headers: getOrgScopeHeaders(requireOrgId(orgId)) },
          15000,
        );
        if (!response.ok) {
          throw getRequestError(payload, response, `Failed to load the OAuth client (${response.status}).`);
        }
        client = parseNativeProviderClient(payload);
      });
      if (!client) {
        throw new Error("Native provider client response was incomplete.");
      }
      return client;
    },
  });
}

export function formatMcpConnectedTimestamp(value: string | null): string {
  if (!value) return "Not connected";
  const date = new Date(value);
  if (Number.isNaN(date.getTime())) return "Not connected";
  return new Intl.DateTimeFormat("en-US", { month: "short", day: "numeric", year: "numeric" }).format(date);
}

View on GitHub (pinned to 2b7df46e8a)

When it happens

Trigger: Thrown at ee/apps/den-web/app/(den)/dashboard/_components/mcp-connections-data.tsx:1074 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01). Data as JSON: /api/errors/5092ab2fcfe3175b. Report an issue: GitHub.