Skip to content

Commit

Permalink
Create throw-error.mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyroosevelt committed Sep 18, 2024
1 parent de6204f commit e05be77
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions components/error/actions/throw-error/throw-error.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import app from "../../error.app.mjs";

export default {
name: "Throw Error",
version: "0.0.1",
key: "error-throw-error",
description: "Quickly throw an error from your workflow.",
props: {
app,
errorMessage: {
type: "string",
label: "Error Message",
description: "The error message to throw",
},
},
type: "action",
async run() {
throw new Error(this.errorMessage);
},
};

0 comments on commit e05be77

Please sign in to comment.