Skip to content

Commit

Permalink
Merge 258aa54 into 0c5adec
Browse files Browse the repository at this point in the history
  • Loading branch information
nflaig authored Jun 20, 2024
2 parents 0c5adec + 258aa54 commit eae97e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/api/src/beacon/client/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ export function getClient(config: ChainForkConfig, baseUrl: string): ApiClient {

// Ignore noisy errors due to beacon node being offline
if (!errEs.message?.includes("ECONNREFUSED")) {
onError?.(new Error(errEs.message));
// If there is no message it likely indicates that the server closed the connection
onError?.(new Error(errEs.message ?? "Server closed connection"));
}

// Consider 400 and 500 status errors unrecoverable, close the eventsource
Expand Down

0 comments on commit eae97e6

Please sign in to comment.