Skip to content

Commit

Permalink
Change exception thrown in SignerType
Browse files Browse the repository at this point in the history
  • Loading branch information
marcos-iov committed Aug 22, 2024
1 parent 72c4d7f commit 97d58c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static SignerType fromConfigValue(String configValue) {
return signerType;
}
}
throw new RuntimeException(String.format("Unsupported signer type: %s", configValue));
throw new IllegalArgumentException(String.format("Unsupported signer type: %s", configValue));
}

public String getType() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ void buildFromConfigHSM() throws SignerException {
@Test
void buildFromConfigUnknown() throws SignerException {
Config configMock = mockConfig("a-random-type");
SignerConfig signerConfig = new SignerConfig("a-random-id", configMock);
try {
SignerConfig signerConfig = new SignerConfig("a-random-id", configMock);
factory.buildFromConfig(signerConfig);
fail();
} catch (RuntimeException e) {
Expand Down

0 comments on commit 97d58c3

Please sign in to comment.