← View all announcements
New release
New release
New release
May 6, 2025

Stay informed: Introducing failed hook notifications

Have you ever logged into Cloudhooks only to discover that a critical hook has been failing without your knowledge? We've solved this problem with our newest feature.

We’ve just rolled out the “Failed hook notifications” feature to let you know when a hook run fails right when it happens.

What is a failed hook run?

Cloudhooks considers a hook run failed when there is an error in the log messages.

An error can appear in the log when:

  • An error is logged with the console.error() function.
  • An error is thrown which is caught by Cloudhooks, not a try/catch block in the hook code. This can happen due to one of the following:
    • A syntax error in the hook code.
    • A runtime error in the hook code (like a null reference).
    • An error explicitly thrown in the hook code.
    • An error thrown by a Cloudhooks action.
    • The hook times out.

If a hook completes with only action messages and log messages then it's considered a successful run.

Here is an example hook run where the hook threw an error (Forced error):

Configure your notification email

To receive notifications, you'll need to set up a notification email address. This address will be used for all important Cloudhooks events, including failed hook runs and monthly usage alerts.

Set the notification email in the “Notifications” pane of the “Settings” page:

You can also subscribe to our product updates (we never give your email address to 3rd parties).

Enable failed hook notifications

Failed hook notifications can be enabled individually for each hook, giving you precise control over which hooks you want to monitor.

Go to the “Settings” tab of the hook, and enable it in the “Notifications” pane:

When an error occurs Cloudhooks sends an email about the failure with the name of the hook, date/time, resource ID:

You can jump right into the error log of the hook run by clicking the “View failed run” link in the email.

Smart notification management

After sending a failed hook notification, further notifications for that hook are automatically paused for 24 hours to keep your inbox clean.

You can explicitly re-enable notifications at any time from the "Settings" tab of the hook:

Best practices for failed hook notifications

  • Use try/catch in your hook to catch errors so that you can handle them explicitly and generate error logs when and how you want.
  • Use await for waiting for async code, rather than then() because asynchronous code might not get taken into account if your hook code exits early.

Start monitoring your hooks today

This new feature helps you maintain reliable integrations by alerting you to problems the moment they occur, rather than discovering them later. Configure your notification email and enable notifications on your critical hooks to ensure your Shopify automations run smoothly.