singhpk234 commented on a change in pull request #4422:
URL: https://github.com/apache/iceberg/pull/4422#discussion_r837043675
##########
File path:
core/src/main/java/org/apache/iceberg/rest/responses/ErrorResponseParser.java
##########
@@ -91,7 +91,7 @@ public static ErrorResponse fromJson(JsonNode jsonNode) {
JsonNode error = jsonNode.get(ERROR);
String message = JsonUtil.getStringOrNull(MESSAGE, error);
String type = JsonUtil.getStringOrNull(TYPE, error);
- Integer code = JsonUtil.getIntOrNull(CODE, error);
+ int code = JsonUtil.getInt(CODE, error);
Review comment:
It would throw an IllegalArgumentException, the UT added with this PR
shows the same.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]