Improve error handling of /genraw and /gen

- /generate TC backend returns more status/error texts
- Fix /genraw and /gen returning null/undefined
- Logging errors on /genraw if backend throws an error
- Fixes #2836
This commit is contained in:
Wolfsblvt
2024-09-12 22:41:53 +02:00
parent 7c383e3218
commit f5b68893d0
3 changed files with 13 additions and 3 deletions

View File

@@ -3265,7 +3265,7 @@ export async function generateRaw(prompt, api, instructOverride, quietToLoud, sy
}
if (data.error) {
throw new Error(data.error);
throw new Error(data.response);
}
const message = cleanUpMessage(extractMessageFromData(data), false, false, true);