Skip to content

Commit 60ca889

Browse files
authored
Merge pull request #38 from BunnyWay/sj/DASH-3012-show-toast-for-download-errors
DASH-3012 feat(Database): Outerbase show toast error in case of download errors
2 parents 8d5afa1 + 061c2e9 commit 60ca889

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/components/gui/schema-sidebar-list.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { ExportFormat, exportTableData } from "@/lib/export-helper";
88
import { Icon, Table } from "@phosphor-icons/react";
99
import { LucideCog, LucideDatabase, LucideView } from "lucide-react";
1010
import { useCallback, useEffect, useMemo, useState } from "react";
11+
import { toast } from "sonner";
1112
import { ListView, ListViewItem } from "../listview";
1213
import { CloudflareIcon } from "../resource-card/icon";
1314
import SchemaCreateDialog from "./schema-editor/schema-create";
@@ -150,6 +151,7 @@ async function downloadExportTable(
150151
a.click();
151152
URL.revokeObjectURL(url);
152153
} catch (error) {
154+
toast.error((error as Error).message ?? `Failed to download exported ${format} file`);
153155
console.error(`Failed to download exported ${format} file:`, error);
154156
}
155157
}

0 commit comments

Comments
 (0)