Duplicating a copy names it after the original; a failed duplicate or delete says why
This commit is contained in:
@@ -3,6 +3,7 @@ import { Check, Copy, Plus, Search, Trash2 } from "lucide-react"
|
||||
import { motion } from "motion/react"
|
||||
import { type ReactNode, useRef, useState } from "react"
|
||||
|
||||
import type { ApiError } from "@/client"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import {
|
||||
Dialog,
|
||||
@@ -22,6 +23,7 @@ import {
|
||||
} from "@/components/ui/tooltip"
|
||||
import useCustomToast from "@/hooks/useCustomToast"
|
||||
import { transitions } from "@/lib/motion"
|
||||
import { extractErrorMessage } from "@/utils"
|
||||
|
||||
/**
|
||||
* The bar over the flows and dashboards lists: find one, publish what is
|
||||
@@ -233,8 +235,8 @@ function useBatch(
|
||||
for (const name of names) {
|
||||
try {
|
||||
await act(name)
|
||||
} catch {
|
||||
failed.push(name)
|
||||
} catch (err) {
|
||||
failed.push(`${name} (${extractErrorMessage(err as ApiError)})`)
|
||||
}
|
||||
}
|
||||
return failed
|
||||
|
||||
Reference in New Issue
Block a user