Skip to content

Commit

Permalink
prevent 500 on tag conversion error
Browse files Browse the repository at this point in the history
  • Loading branch information
DC2-DanielKrueger committed Dec 11, 2024
1 parent d64a988 commit 03314b0
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,15 @@ protected void validateAdapterSchema(
.map(DomainTag::toTagMap)
.collect(Collectors.toList());

final List<? extends Tag> tags = configConverter.mapsToTags(adapterType, domainTags);
final List<? extends Tag> tags;
try {
tags = configConverter.mapsToTags(adapterType, domainTags);
} catch (final IllegalArgumentException illegalArgumentException) {
log.warn("Unable to parse tags for adapter '{}'", adapterName);
log.debug("Original Exception: ", illegalArgumentException);
return ErrorResponseUtil.invalidInput(
"Exception during parsing of tags for the adapter. See log for further information.");
}

final List<NorthboundMapping> northboundMappings = adapter.getNorthboundMappingModels()
.stream()
Expand Down

0 comments on commit 03314b0

Please sign in to comment.