You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs-v2/pages/workflows/errors.mdx
+7-44Lines changed: 7 additions & 44 deletions
Original file line number
Diff line number
Diff line change
@@ -30,57 +30,20 @@ For example, if your workflow throws a `TypeError`, we'll send you an email, but
30
30
31
31
When you're editing and testing your workflow, any unhandled errors will **not** raise errors as emails, nor are they forwarded to [error listeners](#process-errors-with-custom-logic-instead-of-email). Error notifications are only sent when a deployed workflow encounters an error on a live event.
32
32
33
-
## Process errors with custom logic, instead of email
33
+
## Handle errors with custom logic
34
34
35
35
Pipedream exposes a global stream of all errors, raised from all workflows. You can subscribe to this stream, triggering a workflow on every event. This lets you handle errors in a custom way. Instead of sending all errors to email, you can send them to Slack, Discord, AWS, or any other service, and handle them in any custom way.
36
36
37
-
Watch this video to learn more, or check out the step-by-step docs below.
37
+
To do this:
38
38
39
-
<VideoPlayersrc="https://www.youtube.com/embed/7qVLEys_swg"title="Sending Pipedream workflow errors to Cloudwatch"/>
40
-
41
-
<br />
42
-
43
-
1.[Create a new workflow](https://pipedream.com/@/new/build?v=2). You do not need to add a trigger, since the workflow will be triggered on errors, which we'll configure next.
44
-
2. Create a subscription with the following configuration:
45
-
46
-
-`emitter_id`: your workspace ID, found in your [Account Settings](https://pipedream.com/settings/account).
47
-
-`listener_id`: The [workflow ID](/troubleshooting/#where-do-i-find-my-workflow-s-id) from step #1
48
-
-`event_name`: `$errors`
49
-
50
-
For example, you can make this request with your Pipedream API key using `cURL`:
3. Generate an error in a live version of any workflow (errors raised while you're testing your workflow [do not send errors to the `$errors` stream](#test-mode-vs-live-mode)). You should see this error trigger the workflow in step #1. From there, you can build any logic you want to handle errors across workflows.
39
+
1. Create a new workflow.
40
+
2. Add a new trigger. Search for the `Pipedream` app.
41
+
3. Select the custom source `Workspace $error events`.
42
+
4. Generate an error in a live version of any workflow (errors raised while you're testing your workflow [do not send errors to the `$errors` stream](#test-mode-vs-live-mode)). You should see this error trigger the workflow in step #1. From there, you can build any logic you want to handle errors across workflows.
Unlike [the default system emails](#duplicate-errors-do-not-trigger-duplicate-emails), duplicate errors are sent to any workflow listening to the `$errors` stream.
63
-
64
-
## Handle errors for one workflow using custom logic
65
-
66
-
Every time a workflow throws an error, it emits an event to the `$errors` stream for that workflow. You can create [a subscription](/api/rest/#listen-for-events-from-another-source-or-workflow) that delivers these errors to a Pipedream workflow, webhook, and more.
67
-
68
-
Let's walk through an end-to-end example:
69
-
70
-
1. Pick the workflow whose errors you'd like to handle and note its [workflow ID](/troubleshooting/#where-do-i-find-my-workflow-s-id).
71
-
1.[Create a new workflow](https://pipedream.com/@/new/build?v=2). You do not need to add a trigger, since the workflow will be triggered on errors, which we'll configure next. Note the ID for this workflow, as well.
72
-
1. Here, you're going to add the errors from the workflow in step #1 as a trigger for the workflow you created in step #2. In other words, errors from workflow #1 will trigger workflow #2.
73
-
74
-
Make the following request to the Pipedream API, replacing the `emitter_id` with the ID of workflow #1, and the `listener_id` with the ID of workflow #2.
4. Generate an error in a live version of any workflow (errors raised while you're testing your workflow [do not send errors to the `$errors` stream](#test-mode-vs-live-mode)). You should see this error trigger the workflow in step #1. From there, you can build any logic you want to handle errors across workflows.
46
+
Unlike [the default system emails](#duplicate-errors-do-not-trigger-duplicate-emails), duplicate errors are sent to any workflow listeners.
0 commit comments