mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-05-29 06:19:18 +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
|
||||
progressBar.style.display = 'none'
|
||||
} 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'
|
||||
|
||||
if (res.status !== 'succeeded') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user