RussellSpitzer commented on code in PR #16024:
URL: https://github.com/apache/iceberg/pull/16024#discussion_r3164208064
##########
core/src/main/java/org/apache/iceberg/rest/responses/ErrorResponseParser.java:
##########
@@ -46,9 +46,13 @@ public static String toJson(ErrorResponse errorResponse,
boolean pretty) {
public static void toJson(ErrorResponse errorResponse, JsonGenerator
generator)
throws IOException {
generator.writeStartObject();
+ writeErrorField(errorResponse, generator);
+ generator.writeEndObject();
+ }
+ public static void writeErrorField(ErrorResponse errorResponse,
JsonGenerator generator)
Review Comment:
nit: The LLM tells me we normally would call this writeError as we only use
"field" if it is a single field where this is a full object.
Example of primitive writes ---
writeIntegerFieldIf(...)
writeLongFieldIf(...)
writeStringFieldIfPresent(...)
writeIntegerArray(...)
writeLongArray(...)
writeStringArray(...)
writeStringMap(...)
Examples of Object Writes
writeAssignUUID(...)
writeUpgradeFormatVersion(...)
writeAddSchema(...)
writeSetCurrentSchema(...)
writeAddPartitionSpec(...)
writeAddSnapshot(...)
--
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]