Skip to content
Blog

Whispir callbacks - enhanced error handling

Headshot of Whispir Team

Whispir Team

Author

Share this
Oct 1, 2018
3 min read
Screenshot of "Company Settings" webpage

As part of Whispir's continuous improvement programme, in the coming weeks, Whispir will be providing enhancements to the way that callback errors are handled.

What are callbacks?

Whispir currently has the capability to POST responses to Whispir Messages back to customer applications through the use of callbacks (sometimes called webhooks).

Using this capability, customers don't need to poll Whispir looking for responses to messages, instead this information will be provided as soon as it is made available.

This process is much faster for both customers and Whispir, and is the industry standard for transferring data that is made available asynchronously.

What happens if my service isn't available?

Currently, Whispir will send customers an email with every failed callback.  Customers can then triage these emails and insert them into their back end applications as needed.

While this works with smaller numbers, with larger sendouts there is potential for Whispir to send hundreds or even thousands of emails when callbacks fail.

This isn't an ideal solution

What is the alternative?

In the next release, Whispir will be enhancing the way that callback failures are handled.  Instead of sending an email for every callback, Whispir will instead send a single email to advise that the callback endpoint had an issue, and if the new feature is enabled Whispir will periodically retry the callback until it is successful.

This process will continue periodically (~ every 5m) for 24 hours from the original call that detected a failure.  After 24 hours no further retries will be attempted for that particular response.

What happens after 24 hours?

If Whispir cannot contact your service for 24 hours there's only two explanations, it's been turned off intentionally, or there has been a large failure.

In either case, the callback will no longer be automatically retried; we've given you enough time, now the onus is on you.

To make it easy for you, we've provided a new API endpoint `/callbacks/:id/calls`.  This endpoint contains all of the attempts to access your callback, both successful and unsuccessful.

Users can use this to write a script to process all of the callback attempts.  Once processed, users can use a `PUT` request to any of the calls listed to update the status from failed to successful.

How do I enable this feature?

To support backwards compatibility we've decided to have this feature off by default.  To turn it on, simply log into Whispir and under the Administration console select Company Settings -> Portals & Apps -> Manage API Callbacks. Locate your callback entry and click Edit. You can set retries to be enabled or disabled in this screen.

Questions / Contact

If you've got any further questions or would like to know more about this feature, please contact support@whispir.io

For more information, please visit our callbacks page on https://github.com/whispir/

Share this

Talk to an expert

If you’d like to see how easy Whispir makes message building, we’d be happy to walk you through a demonstration.