Skip to content

Commit a6a9c68

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 a2386c7 commit a6a9c68

File tree

3 files changed

+209
-278
lines changed

3 files changed

+209
-278
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
@@ -194,6 +194,11 @@ public JsonObject toJson() {
194194
return builder.build();
195195
}
196196

197+
@Override
198+
public String toString() {
199+
return this.toJson().toString();
200+
}
201+
197202
/**
198203
* Internal class so that Javalin serializes the FormattedError class using its `toJson` method.
199204
* This avoids needing to call `toJson` every time the FormattedError class is used as an endpoint return.
@@ -206,7 +211,7 @@ public void serialize(
206211
final JsonGenerator jsonGenerator,
207212
final SerializerProvider serializerProvider) throws IOException
208213
{
209-
jsonGenerator.writeRaw(formattedError.toJson().toString());
214+
jsonGenerator.writeRaw(formattedError.toString());
210215
}
211216
}
212217
}

0 commit comments

Comments
 (0)