Merge pull request #1782 from yanCode/fix/json-format

fix: the display format of json error
This commit is contained in:
Yifei Zhang
2023-06-01 10:56:47 +08:00
committed by GitHub

View File

@@ -6,5 +6,8 @@ export function prettyObject(msg: any) {
if (msg === "{}") {
return obj.toString();
}
if (msg.startsWith("```json")) {
return msg;
}
return ["```json", msg, "```"].join("\n");
}