Skip to content

Commit

Permalink
fix(validator): only log info message if node is syncing
Browse files Browse the repository at this point in the history
  • Loading branch information
nflaig committed May 5, 2023
1 parent 81b9998 commit 913a51d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/validator/src/util/logger.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {HttpError} from "@lodestar/api";
import {ApiError} from "@lodestar/api";
import {LogData, Logger, isErrorAborted} from "@lodestar/utils";
import {IClock} from "./clock.js";

Expand All @@ -18,7 +18,7 @@ export function getLoggerVc(logger: Logger, clock: IClock): LoggerVc {
if (e) {
// Returns true if it's an network error with code 503 = Node is syncing
// https://github.com/ethereum/beacon-APIs/blob/e68a954e1b6f6eb5421abf4532c171ce301c6b2e/types/http.yaml#L62
if (e instanceof HttpError && e.status === 503) {
if (e instanceof ApiError && e.status === 503) {
this.isSyncing(e);
}
// Only log if arg `e` is not an instance of `ErrorAborted`
Expand Down

0 comments on commit 913a51d

Please sign in to comment.