mirror of
https://github.com/OpenBankProject/API-Explorer-II.git
synced 2026-02-06 10:47:04 +00:00
bugfix/API Explorer II should report JSON error in case of a JSON error
This commit is contained in:
parent
1efc0beced
commit
1dc7c030f6
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "api-explorer",
|
||||
"version": "1.0.13",
|
||||
"version": "1.0.14",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite & ts-node server/app.ts",
|
||||
|
||||
@ -126,7 +126,9 @@ const submit = async (form: FormInstance, fn: () => void) => {
|
||||
fn(form).then(() => {})
|
||||
}
|
||||
const highlightCode = (json) => {
|
||||
if (json) {
|
||||
if (json.error) {
|
||||
successResponseBody.value = json.error.message
|
||||
} else if (json) {
|
||||
successResponseBody.value = hljs.lineNumbersValue(
|
||||
hljs.highlightAuto(JSON.stringify(json, null, 4), ['JSON']).value
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user