Skip to content

Commit 596b5cd

Browse files
daimon111claude
andcommitted
fix: log RPC errors instead of silently swallowing them
Root cause of empty agents: public Base RPC (mainnet.base.org) was rate-limiting the worker. Switched BASE_RPC secret to publicnode.com. Added console.error logging so future RPC failures are visible. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a1c51f1 commit 596b5cd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

worker/src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,9 @@ async function buildNetworkData(env: Env): Promise<NetworkResponse> {
341341
let registryAgents: Awaited<ReturnType<typeof fetchRegistryAgents>>;
342342
try {
343343
registryAgents = await fetchRegistryAgents(env);
344-
} catch {
344+
} catch (err) {
345+
const msg = err instanceof Error ? err.message : String(err);
346+
console.error("fetchRegistryAgents failed:", msg);
345347
return { agents: [], cachedAt: Date.now() };
346348
}
347349

0 commit comments

Comments
 (0)