Skip to content

Commit

Permalink
Fixed exception message to correctly contain the applicable applicati…
Browse files Browse the repository at this point in the history
…on version.
  • Loading branch information
Pekka Iso-Ahola authored and remmeier committed Jan 22, 2021
1 parent d9fc756 commit 252b782
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ private void setAttribute(ResourceInformation resourceInformation, Object instan
ResourceField field = resourceInformation.findFieldByJsonName(attributeJsonName, queryContext.getRequestVersion());

if (field == null && resourceInformation.hasJsonField(attributeJsonName)) {
throw new BadRequestException(String.format("attribute %s not available for version {}", attributeJsonName, queryContext.getRequestVersion()));
throw new BadRequestException(String.format("attribute %s not available for version %s", attributeJsonName, queryContext.getRequestVersion()));
} else if (field != null) {
PreconditionUtil.verifyEquals(ResourceFieldType.ATTRIBUTE, field.getResourceFieldType(), "expected %s being an attribute", attributeJsonName);
}
Expand Down

0 comments on commit 252b782

Please sign in to comment.