Skip to content

Commit

Permalink
Alter exit code if NoValidatorKeysStateException
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyeh committed Nov 28, 2023
1 parent f4c8281 commit a92a630
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,9 @@ public Integer call() {
.ifPresentOrElse(this::reportUserError, () -> reportUnexpectedError(e));
} catch (Throwable t) {
reportUnexpectedError(t);
if (t instanceof NoValidatorKeysStateException) {
return 2;
}
}
return 1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import tech.pegasys.teku.infrastructure.logging.LoggingConfigurator;
import tech.pegasys.teku.networks.Eth2NetworkConfiguration;
import tech.pegasys.teku.storage.server.DatabaseStorageException;
import tech.pegasys.teku.validator.client.NoValidatorKeysStateException;

@Command(
name = "validator-client",
Expand Down Expand Up @@ -110,6 +111,9 @@ public Integer call() {
parentCommand::reportUserError, () -> parentCommand.reportUnexpectedError(e));
} catch (Throwable t) {
parentCommand.reportUnexpectedError(t);
if (t instanceof NoValidatorKeysStateException) {
return 2;
}
}
return 1;
}
Expand Down

0 comments on commit a92a630

Please sign in to comment.