From f69c22b6af447d4e70c4a0e2c0438bd8402ae78f Mon Sep 17 00:00:00 2001 From: Mark Date: Wed, 15 Jan 2020 17:26:52 +1100 Subject: [PATCH] Added suggestion re webhook 200 code processing This will hopefully save folk spending undue time figuring out what is going on and then posting on the community forum asking what to do. --- src/content/reference/device-cloud/webhooks.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/content/reference/device-cloud/webhooks.md b/src/content/reference/device-cloud/webhooks.md index 34c2fe5f5a..55eefa4e25 100644 --- a/src/content/reference/device-cloud/webhooks.md +++ b/src/content/reference/device-cloud/webhooks.md @@ -651,6 +651,8 @@ You will know that your webhook is being throttled if you see a `hook-error` event in your event stream that reads "Sleeping, too many errors, please wait and try again" in the body. +If you anticipate that your target webservice may respond to data packets with an HTTP status error code, ie a smart wifi plug is offline and cannot be contacted, then it's a good idea to use middleware to always return a 200 status code to the Particle webhook request. IE you could create a GCP Cloud Function or use AWS HTTP Gateway as your webhook target. In your cloud function or HTTP Gateway you can easily force a code 200 response to Particle. This avoid any impact on the webhook system processing your requests. + We remind you to be a good Internet citizen and only send webhook requests to target sites that you have permission to send traffic.