Add error logging to SD generate endpoint

This commit is contained in:
Cohee 2023-10-23 13:03:01 +03:00
parent 3995238d77
commit 9a647b96df
1 changed files with 2 additions and 1 deletions

View File

@ -270,7 +270,8 @@ function registerEndpoints(app, jsonParser) {
});
if (!result.ok) {
throw new Error('SD WebUI returned an error.');
const text = await result.text();
throw new Error('SD WebUI returned an error.', { cause: text });
}
const data = await result.json();