Skip to content

Commit bb255ee

Browse files
committed
Make bulkPost and Post behavior align
Rather than having slightly different methods for the bulk and non-bulk move/copy behavior, the non-bulk version was so that the bulk version could call it and ingest the result.
1 parent 7698393 commit bb255ee

File tree

3 files changed

+211
-280
lines changed

3 files changed

+211
-280
lines changed

workspace-server/src/main/java/gov/nasa/jpl/aerie/workspace/server/FormattedError.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,11 @@ public JsonObject toJson() {
196196
return builder.build();
197197
}
198198

199+
@Override
200+
public String toString() {
201+
return this.toJson().toString();
202+
}
203+
199204
/**
200205
* Internal class so that Javalin serializes the FormattedError class using its `toJson` method.
201206
* This avoids needing to call `toJson` every time the FormattedError class is used as an endpoint return.
@@ -208,7 +213,7 @@ public void serialize(
208213
final JsonGenerator jsonGenerator,
209214
final SerializerProvider serializerProvider) throws IOException
210215
{
211-
jsonGenerator.writeRaw(formattedError.toJson().toString());
216+
jsonGenerator.writeRaw(formattedError.toString());
212217
}
213218
}
214219
}

0 commit comments

Comments
 (0)