Send SMS on webhook failures


The project I am working on involves sending data to a database from a bunch of Electrons. We publish the data with a Particle.publish and then use a webhook to send the data to our server. This works the majority of the time, but on occasion, our server starts rejecting the hooks and we loose hours of data until we fix it. Not sure why this is happening, but it is being looked at. In the mean time, I was wondering if there is any way to detect the failed webhooks on the console side and send a different hook to Twilio when this happens. This way, we will be alerted of the problem right away and can fix it without too much data loss.

Is this your own server?
Does it actively reject the request or does it just not get it?
In case of the former, this might be a place catch that “exception” and trigger the SMS.

Not sure about the console side, but your device should get an error response from the webhook. When you subscribe to that, you can trigger all kinds of stuff from your device’s side.