Skip to content

Commit b055edc

Browse files
committed
using a more specfic exception
1 parent e840204 commit b055edc

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

modules/data-streams/src/main/java/org/elasticsearch/datastreams/action/TransportUpdateDataStreamMappingsAction.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import org.elasticsearch.threadpool.ThreadPool;
3737
import org.elasticsearch.transport.TransportService;
3838

39+
import java.io.IOException;
3940
import java.util.ArrayList;
4041
import java.util.List;
4142

@@ -169,7 +170,7 @@ private void updateSingleDataStream(
169170
dataStream.getEffectiveMappings(clusterService.state().metadata().getProject(projectId), indicesService)
170171
)
171172
);
172-
} catch (Exception e) {
173+
} catch (IOException e) {
173174
dataStreamMappingsResponseActionListener.onResponse(
174175
new UpdateDataStreamMappingsAction.DataStreamMappingsResponse(
175176
dataStreamName,

server/src/main/java/org/elasticsearch/cluster/metadata/DataStream.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ public Settings getEffectiveSettings(ProjectMetadata projectMetadata) {
423423
* @return A JSON CompressedXContent representation of the effective mappings of this data stream
424424
* @throws Exception
425425
*/
426-
public CompressedXContent getEffectiveMappings(ProjectMetadata projectMetadata, IndicesService indicesService) throws Exception {
426+
public CompressedXContent getEffectiveMappings(ProjectMetadata projectMetadata, IndicesService indicesService) throws IOException {
427427
return getEffectiveMappings(projectMetadata, getMatchingIndexTemplate(projectMetadata), mappings, getWriteIndex(), indicesService);
428428
}
429429

0 commit comments

Comments
 (0)