diff --git a/moto/kinesis/models.py b/moto/kinesis/models.py index d24afd2b7..a68103f26 100644 --- a/moto/kinesis/models.py +++ b/moto/kinesis/models.py @@ -203,7 +203,7 @@ class KinesisBackend(BaseBackend): def create_stream(self, stream_name, shard_count, region): if stream_name in self.streams: - return ResourceInUseError(stream_name) + raise ResourceInUseError(stream_name) stream = Stream(stream_name, shard_count, region) self.streams[stream_name] = stream return stream diff --git a/moto/kinesis/responses.py b/moto/kinesis/responses.py index 61a4a8199..dd364c49a 100644 --- a/moto/kinesis/responses.py +++ b/moto/kinesis/responses.py @@ -25,9 +25,7 @@ class KinesisResponse(BaseResponse): def create_stream(self): stream_name = self.parameters.get('StreamName') shard_count = self.parameters.get('ShardCount') - stream = self.kinesis_backend.create_stream(stream_name, shard_count, self.region) - if isinstance(stream, BadRequest): - return stream.description + self.kinesis_backend.create_stream(stream_name, shard_count, self.region) return "" def describe_stream(self):