fix: error on empty destination when creating a default transfer tool

This commit is contained in:
Sabiha Khan 2026-07-13 16:44:14 +05:30
parent 6d1051757c
commit 50e3c8c281
3 changed files with 7 additions and 9 deletions

View file

@ -39,6 +39,7 @@ import {
SelectValue,
} from "@/components/ui/select";
import { Skeleton } from "@/components/ui/skeleton";
import { detailFromError } from "@/lib/apiError";
import { useAuth } from "@/lib/auth";
import {
@ -154,8 +155,7 @@ export default function ToolsPage() {
});
if (response.error) {
const errorDetail = (response.error as { detail?: string })?.detail;
setCreateError(errorDetail || "Failed to create tool");
setCreateError(detailFromError(response.error, "Failed to create tool"));
return;
}