Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Webhook endpoint returns 4xx or 5xx: lead dropped, how to fix

DLV-111High impactPartlyBy FunnelGuardPublished Updated
On this page

What this issue is

When a visitor submits a form, many sites send the data on to another service with an HTTP request called a webhook. The receiving service replies with a status code. Codes starting with 2 (such as 200) mean success. Codes starting with 4 mean the request was refused or wrong. Codes starting with 5 mean the receiving server failed.

Common error codes and what they usually mean for a webhook
CodeMeaningTypical cause
400Bad requestPayload is malformed or a required field is missing
401 / 403Not allowedMissing, wrong or expired token, key or signature
404Not foundURL is wrong, or the zap, scenario or route was deleted
410GoneEndpoint was permanently removed
413Payload too largeFile upload or long text exceeds the limit
429Too many requestsRate limit hit during a traffic spike
500 / 502 / 503 / 504Server error or unavailableReceiver crashed, is down, is overloaded or timed out

Why it costs you leads or sales

The lead was real and the visitor did their part. If the webhook fails, the data never reaches your CRM, spreadsheet, email tool or sales team. Nobody follows up, and ad platforms still count the form as a conversion, so your reports look healthy while sales get nothing.

Many form tools try once and give up, or retry only a few times. Some keep no copy of the submission at all. That is why a short outage can mean permanently lost leads.

Where the lead is lost
  1. Visitor submits formPage shows thank-you
  2. Webhook sentPOST to the endpoint
  3. Endpoint replies 4xx/5xxRequest rejected or failed
  4. CRM recordNever created
  5. Sales follow-upNobody is notified

The form works and the visitor sees success, but the receiver rejects the webhook.

Leads that reach the CRM per weekExample numbers
Leads that reach the CRM per week (example)Form submissions: 50 leads; Reached CRM (webhook healthy): 50 leads; Reached CRM (webhook failing 3 days): 29 leads01938505029Form submissionsReached CRM (webhook …Reached CRM (webhook …leads

Example: 50 form submissions a week, with the webhook failing for part of the week.

How to check if your site has it

Find out whether webhooks are being rejected
  1. Open the sender's delivery log

    Look in the form tool or plugin for a log of webhook calls (for example a logs, entries or integrations tab). Filter for responses that are not 2xx.

  2. Check the receiver's history

    In Zapier look at Zap runs and webhook history. In Make open the scenario history. In n8n open Executions. Look for errors or for no runs at all at the time of a submission.

  3. Compare counts

    Count form entries for the last 7 days and compare with records in the CRM or sheet. A gap points to dropped webhooks.

  4. Replay the call by hand

    Send a test request to the endpoint with curl and read the status code (see the snippet below).

  5. Submit a test lead

    Fill in the live form with a clearly marked test entry and watch whether it arrives end to end.

Test a webhook endpoint and print the status codebash
curl -i -X POST "https://example.com/your-webhook-url" \
  -H "Content-Type: application/json" \
  -d '{"name":"Test Lead","email":"test@example.com"}'

How to fix it

The fix depends on the status code. Work out which code you get first, then follow the matching cause.

Fix the failing webhook
  1. 404 or 410: correct the URL

    Copy the current webhook URL from the receiving tool and paste it into the form settings. Check that the zap, scenario or workflow still exists and is switched on. In n8n, production and test URLs differ.

  2. 401 or 403: fix authentication

    Check the header, token or API key the sender includes. Regenerate it if it expired and update both sides. Confirm that firewalls or security plugins are not blocking the sender.

  3. 400 or 422: match the payload

    Compare what the sender posts with what the receiver expects: field names, required fields, content type (JSON or form-encoded) and data types.

  4. 413: reduce the payload

    Remove file uploads from the webhook or send a link to the file instead. Raise the body size limit on your own server if you control it.

  5. 429: slow down or raise limits

    Check the receiver's rate limits and plan. Queue submissions or upgrade the plan if bursts are normal for you.

  6. 5xx: fix or restart the receiver

    Read the server or app error log. Fix the code error, restore the service or free up resources. For third-party tools, check their status page.

  7. Recover the lost leads

    Export entries stored in the form tool for the failure period and import them into the CRM, or resend the failed deliveries if the tool offers it.

  8. Turn on retries and a backup copy

    Enable automatic retries if the form tool has them, and keep an email notification or stored entry as a fallback.

Where to look on your platform
  1. Open the form plugin's webhook settings

    In plugins such as Gravity Forms (Webhooks add-on), WPForms or Contact Form 7 add-ons, open the form's webhook feed and check the URL, request method and format.

  2. Read the delivery log

    Enable logging in the plugin and look for non-2xx responses. Check the entry list so you can resend failed ones.

  3. Check security plugins

    If you own the receiving endpoint on WordPress, confirm a firewall or security plugin is not blocking the request.

Example: store first, then send with retries (Node.js 18+)javascript
async function sendWebhook(url, payload, tries = 4) {
  for (let i = 0; i < tries; i++) {
    try {
      const res = await fetch(url, {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify(payload),
        signal: AbortSignal.timeout(10000)
      });
      if (res.ok) return true;
      // Client errors other than 429 will not fix themselves
      if (res.status >= 400 && res.status < 500 && res.status !== 429) {
        console.error('Webhook rejected', res.status);
        return false;
      }
    } catch (err) {
      console.error('Webhook error', err.message);
    }
    await new Promise(r => setTimeout(r, 1000 * 2 ** i));
  }
  return false; // keep the lead in your database and flag it for resend
}
Webhook handling before and after

Before

  • Form sends the webhook once and ignores the reply
  • A 404 or 500 goes unnoticed
  • Leads exist only in the failed call
  • Team finds out when a customer complains

After

  • Every submission is stored before sending
  • Failures are logged and retried
  • An alert fires when responses are not 2xx
  • Missed leads are resent from the stored copy

How to confirm it's fixed

Confirmation checks
  • The endpoint returns a 2xx status when you test it with curl
  • A fresh test submission on the live form appears in the CRM or sheet
  • The sender's delivery log shows a successful response for that submission
  • The receiving zap, scenario or workflow shows a run and is switched on
  • Leads from the outage period have been resent or imported
  • The test record has been deleted or marked as a test

How to prevent it happening again

Habits that stop silent drops
  • Keep a stored copy of every submission in the form tool or your database
  • Enable retries on the sender where available
  • Send failure alerts from the sender's log to a shared inbox or chat channel
  • Document who owns each webhook URL and secret, and when tokens expire
  • Re-test after plugin updates, domain changes, SSL renewals and automation edits
  • Compare form entries with CRM records once a week
  • Never delete a zap, scenario or route without updating the form first
How a dropped lead unfolds
  1. Day 0

    Someone edits or deletes the receiving automation. The webhook URL now returns 404.

  2. Day 0-3

    Visitors keep submitting. The form shows thank-you, ad platforms count conversions.

  3. Day 4

    Sales notice fewer enquiries than usual.

  4. Day 5

    Delivery log shows failed calls. URL is fixed and stored entries are resent.

How FunnelGuard handles this

FunnelGuard detects this issue only partly. A robot visitor runs your real form on a schedule and checks whether the test lead arrives. It sees a webhook failure only when the chain reaches its own catcher, meaning the test lead gets through to the point FunnelGuard can observe it. If the failing webhook sits earlier in the chain, or goes to a system FunnelGuard does not receive from, the test may not reveal it.

FunnelGuard does not read the delivery logs of your form plugin, Zapier, Make, n8n or CRM, and it cannot see the status code returned by every endpoint you use. It also cannot tell you about real leads that were dropped before or after a test run.

When a check fails, FunnelGuard re-checks from a second region before sending one alert by email, Slack, Teams, WhatsApp, webhook or PagerDuty, with a screenshot and a likely cause. The Free plan covers 1 site and 2 journeys with daily checks and no card. Paid plans start at $39/month with a 3-day free trial. A free read-only website audit is also available.

Questions people ask

Why is my webhook returning a 400 error?

A 400 means the receiver did not accept the request as sent. Usually a required field is missing, the field names differ from what it expects, or the content type (JSON or form-encoded) is wrong. Compare the sent payload with the receiver's documentation.

Why is my form webhook returning 404?

A 404 means nothing exists at that URL. The zap, scenario or workflow may have been deleted or renamed, or the URL was copied wrongly. Copy the current URL from the receiving tool and update the form.

What happens to a lead when a webhook fails?

It depends on the form tool. Some retry a few times, some log the failure, and some just discard the call. If the form also stores the entry, you can resend it; if not, the lead may be lost.

How do I test if my webhook URL works?

Send a POST request with curl or a tool such as Postman, using fake test data, and read the status code. A 2xx means the endpoint accepted it. Then check the receiving system to confirm a record appeared and delete it afterwards.

Should a webhook retry on a 4xx error?

Mostly no. Errors like 400, 401 and 404 usually need a fix, so retrying repeats the failure. Retry on 429 and 5xx errors, using a growing delay between attempts.

How do I recover leads lost to a failed webhook?

Export the stored form entries for the outage period and import them into your CRM, or use the resend option if your form tool has one. If nothing was stored, check email notifications, server logs and the automation platform's history.

Can FunnelGuard detect webhook errors?

Only partly. It sees the failure when the test lead's chain reaches its catcher. It does not read your form plugin or automation logs, so also use failure alerts in those tools and compare entries with CRM records.

Does FunnelGuard catch this?

Partly

FunnelGuard checks part of this.

How: Seen only when the chain reaches our catcher.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.