Skip to content

Commit

Permalink
error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
yongenaelf committed Jul 24, 2024
1 parent b66d1f8 commit 4a3211b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/workspace/cli.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ export default function Cli() {
return "Build successful.";
},
deploy: async () => {
if (typeof id !== "string") throw new Error("id is not string");
if (typeof id !== "string") return "Workspace id not found.";
const { dll } = (await db.workspaces.get(id)) || {};
if (!dll) throw new Error("dll not built.");
if (!dll) return "Contract not built. Please build first.";
const { TransactionId } = await deploy(dll);
try {
const result: { TransactionId: string; Status: string } =
Expand Down

0 comments on commit 4a3211b

Please sign in to comment.