diff --git a/apps/web/src/components/settings/settings-dialog.tsx b/apps/web/src/components/settings/settings-dialog.tsx index 1be5c5d5..ecb5abec 100644 --- a/apps/web/src/components/settings/settings-dialog.tsx +++ b/apps/web/src/components/settings/settings-dialog.tsx @@ -295,7 +295,7 @@ function SystemSection() { }); setSettings((prev) => ({ ...prev, customLogo: "true" })); } catch { - /* handle error */ + setSaveMsg("Failed to upload logo."); } }; @@ -304,7 +304,7 @@ function SystemSection() { await apiDelete("/v1/settings/logo"); setSettings((prev) => ({ ...prev, customLogo: "false" })); } catch { - /* handle error */ + setSaveMsg("Failed to delete logo."); } }; diff --git a/apps/web/src/pages/automate-page.tsx b/apps/web/src/pages/automate-page.tsx index 218367dc..c198ec57 100644 --- a/apps/web/src/pages/automate-page.tsx +++ b/apps/web/src/pages/automate-page.tsx @@ -66,9 +66,12 @@ export function AutomatePage() { }); if (res.ok) { await loadPipelines(); + } else { + const data = await res.json().catch(() => ({})); + setExecutionError(data.error || "Failed to save pipeline"); } } catch { - // Error handling could be added + setExecutionError("Connection error while saving pipeline."); } finally { setSaving(false); } diff --git a/tests/integration/api.test.ts b/tests/integration/api.test.ts index f1942212..9b31b6b6 100644 --- a/tests/integration/api.test.ts +++ b/tests/integration/api.test.ts @@ -2668,6 +2668,31 @@ describe("Batch processing", () => { expect(res.headers["content-type"]).toBe("application/zip"); }); }); + + describe("Batch rejects custom-route tools", () => { + const customRouteTools = ["remove-background", "upscale", "ocr", "blur-faces", "erase-object"]; + + for (const toolId of customRouteTools) { + it(`returns 404 for batch "${toolId}" (custom-route tool)`, async () => { + const { body: payload, contentType } = createMultipartPayload([ + { name: "file", filename: "a.png", contentType: "image/png", content: PNG_200x150 }, + { name: "settings", content: JSON.stringify({}) }, + ]); + + const res = await app.inject({ + method: "POST", + url: `/api/v1/tools/${toolId}/batch`, + headers: { + authorization: `Bearer ${adminToken}`, + "content-type": contentType, + }, + payload, + }); + expect(res.statusCode).toBe(404); + expect(JSON.parse(res.body).error).toContain("not found"); + }); + } + }); }); // ═══════════════════════════════════════════════════════════════════════════