Error Handling

This section describes how Field Nation handles any errors returned from your endpoint URL. It also includes common authentication errors returned from the Webhooks REST API.

Push Errors

If your Webhook endpoint URL acknowledges with an HTTP status code other than 2xx, the Webhook is qued to be resent (up to a total of three attempts). To disable this feature, include the no_retries parameter and set the value to true. When no_retries is true, Webhooks are not resent unless a 404 status code is received.

{
    "url": "https://yourcompany.com/handle_webhook",
    "method": "POST",
    "secret": "yoursecretHash",
    "active": true,
    "events": [],
    "no_retries": true,
    "company_id": 183,
    "user_id": 756
}

Authentication Errors

When you make a Webhooks request, you must pass the fn-token in the Header. If your token is not included, you’ll receive the following error:

{
    "error": "A token is required."
}