diff --git a/components/workspace/use-cli-commands.tsx b/components/workspace/use-cli-commands.tsx
index 633609d..6a3b893 100644
--- a/components/workspace/use-cli-commands.tsx
+++ b/components/workspace/use-cli-commands.tsx
@@ -310,12 +310,15 @@ export function useCliCommands() {
method: "POST",
body: JSON.stringify({ files }),
});
- const { id } = await res.json();
+ const { id, error } = await res.json();
+
+ if (error || !id)
+ throw new Error(error);
terminalContext.setBufferedContent(
{err.message?.trim() || "There was an error generating the share link. Please try again later."}
); return; } },