Updated exception wording for region validation in StreamArn to be more consistent with other error messages
This commit is contained in:
parent
a3d10bf702
commit
f212e66542
2 changed files with 2 additions and 2 deletions
|
|
@ -88,7 +88,7 @@ public class KinesisClientLibConfigurator {
|
|||
//Parse out the region from the Arn and set (and/or override existing value for region)
|
||||
Region regionObj = Region.of(streamArnObj.region().get());
|
||||
if(Region.regions().stream().filter(x -> x.id().equalsIgnoreCase(regionObj.id())).count() == 0){
|
||||
throw new IllegalArgumentException(String.format("%s is not a valid region", regionObj.id()));
|
||||
throw new IllegalArgumentException(String.format("StreamArn has unsupported region of '%s'.", regionObj.id()));
|
||||
}
|
||||
configuration.setRegionName(regionObj);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ public class MultiLangDaemonConfigTest {
|
|||
@Test
|
||||
public void testConstructorFailsBecauseStreamArnHasInvalidRegion() throws Exception {
|
||||
setup("", "arn:aws:kinesis:us-east-1000:ACCOUNT_ID:stream/streamName");
|
||||
assertConstructorThrowsException(IllegalArgumentException.class, "us-east-1000 is not a valid region");
|
||||
assertConstructorThrowsException(IllegalArgumentException.class, "StreamArn has unsupported region of 'us-east-1000'.");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
Loading…
Reference in a new issue