Is there a way to see more errors than I can currently see in the list of events in a workflow?

This topic was automatically generated from Slack. You can find the original thread here.

Bharat Kilaru : Hi - is there a good way to continue scrolling or seeing all the errors logged for a specific Workflow? Thanks

Dylan Sather (Pipedream) : are you saying you’ve received some errors that you can’t see because you can only see the last 100 events in your workflow?

Bharat Kilaru : Exactly

Dylan Sather (Pipedream) : Right now, you can’t see any errors / events in the UI past the last 100. However, we provide an API endpoint for listing the last 100 errors for a specific workflow here: https://docs.pipedream.com/api/rest/#get-workflow-errors.

You might also be able to see them in your global error workflow, which receives every error by default.

We hope to get a longer history of errors displayed in the UI, but let me know if that helps for now

Bharat Kilaru : Cool thanks - checking this API out

Dylan Sather (Pipedream) : if you’re interested, you can technically use another API to have an “error handler” workflow listen for all errors from another workflow, so that you can have custom error handling for a specific workflow. Or at the very least, it’ll log all the errors in the UI.

Let me know how wild you want to get and I can share details on that

Bharat Kilaru : One thing I’ve been taking heavy advantage of is re-running the workflow based on the trigger in the event of an error.

e.g. someone sends Typeform submission -> workflow errors -> I debug -> I use refresh button in app to rerun.

Overall, been a big fan of the UI to manage errors

Dylan Sather (Pipedream) : I hear you

Bharat Kilaru : Probably the simplest thing which would improve the experience is that currently I noticed we get email notified sometimes when an error occurs, but when I go check it out, I find that there were other errors I didn’t get emailed about.

Any suggestions for work I can do to tweak that a bit to at least be sure we get email notified about each one?

Dylan Sather (Pipedream) : Yes, currently the global error workflow only sends at most one email

• Per workflow
• Per unique error type (Error is different than SyntaxError, for example)
• Per 24-hour period
Since the global error workflow is just another workflow, it’s yours to modify. You can remove this part of the first step to remove that logic:

if ($checkpoint && $checkpoint[workflow_id] && $checkpoint[workflow_id][code]) {
  console.log(`We've seen error ${code} for workflow ${workflow_id} before. Checking the time of the last event.`)
  // Check if we've seen this error within the past 24 hours
  const lastErrorDate = new Date($checkpoint[workflow_id][code].lastSeen)
  const diffInHours = differenceInHours(new Date(ts), lastErrorDate)
  if (diffInHours <= 24) {
    $end(`Error ${code} occurred ${diffInHours} hours ago. No notification to send.`)
  }
}