Minor fixes

This commit is contained in:
adlee-was-taken
2026-04-04 16:29:20 -04:00
parent 05382c4081
commit 4607ff27dd
23 changed files with 1772 additions and 28 deletions

View File

@@ -974,13 +974,13 @@ const Stegasoo = {
body: formData,
});
const result = await response.json().catch(() => null);
if (!response.ok) {
throw new Error('Failed to start encode');
throw new Error((result && result.error) || 'Failed to start encode');
}
const result = await response.json();
if (result.error) {
if (result && result.error) {
throw new Error(result.error);
}