Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added suggestion re webhook 200 code processing #1064

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/content/reference/device-cloud/webhooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down