Fix Horde image error logging

This commit is contained in:
Cohee
2023-06-07 11:03:11 +03:00
parent 7cff1a92fa
commit af8be07563

View File

@@ -3309,6 +3309,11 @@ app.post('/horde_generateimage', jsonParser, async (request, response) => {
}, },
{ token: api_key_horde }); { token: api_key_horde });
if (!generation.id) {
console.error('Image generation request is not satisfyable:', generation.message || 'unknown error');
return response.sendStatus(400);
}
for (let attempt = 0; attempt < MAX_ATTEMPTS; attempt++) { for (let attempt = 0; attempt < MAX_ATTEMPTS; attempt++) {
await delay(CHECK_INTERVAL); await delay(CHECK_INTERVAL);
const check = await ai_horde.getImageGenerationCheck(generation.id); const check = await ai_horde.getImageGenerationCheck(generation.id);