mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-05-30 22:55:40 +02:00
Catch invalid JSON entries
This commit is contained in:
parent
858a1c7ae0
commit
4f58a485a6
@ -952,7 +952,13 @@ async function doMakeImage(reqBody, batchCount) {
|
|||||||
res = undefined
|
res = undefined
|
||||||
progressBar.style.display = 'none'
|
progressBar.style.display = 'none'
|
||||||
} else {
|
} else {
|
||||||
res = JSON.parse(finalJSON)
|
try {
|
||||||
|
res = JSON.parse(finalJSON)
|
||||||
|
} catch (e) {
|
||||||
|
console.log('Parse error, invalid JSON', finalJSON)
|
||||||
|
throw e
|
||||||
|
}
|
||||||
|
|
||||||
progressBar.style.display = 'none'
|
progressBar.style.display = 'none'
|
||||||
|
|
||||||
if (res.status !== 'succeeded') {
|
if (res.status !== 'succeeded') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user