Skip to content

Commit

Permalink
Add error logging for exception
Browse files Browse the repository at this point in the history
  • Loading branch information
nazarhussain committed Jul 13, 2023
1 parent 229eee0 commit bb7a1c0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/beacon-node/src/execution/engine/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,14 +389,19 @@ export class ExecutionEngineHttp implements IExecutionEngine {
return (this.rpcFetchQueue.push(payload) as Promise<R>).then((response) => {
if (this.state !== ExecutionEngineState.SYNCED) {
// Update the state of the execution engine in async to avoid blocking the request
void this.fetchAndUpdateEngineState();
void this.fetchAndUpdateEngineState().catch((err) => {
this.logger.error("Error updating execution engine state", err);
});
}

return response;
});
} catch (err) {
// Update the state of the execution engine async to avoid blocking the request
void this.fetchAndUpdateEngineState();
void this.fetchAndUpdateEngineState().catch((err) => {
this.logger.error("Error updating execution engine state", err);
});

throw err;
}
}
Expand Down

0 comments on commit bb7a1c0

Please sign in to comment.