(
return (
{
- if (!sessionId) return;
+ if (!sessionId) throw new Error("Session not ready, try again in a moment");
try {
const res = await fetch(`${API_URL}/api/queue`, {
method: "POST",
@@ -101,7 +101,10 @@ export function SessionProvider({ children }: { children: React.ReactNode }) {
body: JSON.stringify({ url }),
});
- if (!res.ok) throw new Error("Failed to queue download");
+ if (!res.ok) {
+ const body = (await res.json().catch(() => null)) as { error?: string } | null;
+ throw new Error(body?.error || "Failed to queue download");
+ }
await refreshTasks(); // Immediate refresh
diff --git a/web/src/index.css b/web/src/index.css
index 583a1de..7c47070 100644
--- a/web/src/index.css
+++ b/web/src/index.css
@@ -45,7 +45,7 @@
--accent: 217.2 32.6% 17.5%;
--accent-foreground: 210 40% 98%;
- --destructive: 0 62.8% 30.6%;
+ --destructive: 0 72% 54%;
--destructive-foreground: 210 40% 98%;
--border: 217.2 32.6% 17.5%;