Webhook broke after a provider change, or you can't parse the error body? Handling webhook drift
Two webhook problems catch teams off guard: a webhook that worked for months suddenly breaks because the provider changed the payload, and an error response you can't make sense of because it's a structured application/problem+json document you're treating as a blob.
Payload schema drift
You built the handler against the payload as it looked then. Months later the provider renames a field, nests it differently, or drops it — schema drift — and your parser, which assumed the old shape, breaks. Nothing changed on your side, which is what makes it confusing.
- Pin the webhook API version where the provider supports it, so payload shape changes are opt-in, not surprise.
- Fail loud on a missing expected key. If a field you depend on is absent, raise a clear error — don't silently process a half-parsed payload and corrupt downstream state.
- Validate the payload against a schema at the boundary, so drift is caught immediately with a precise message.
Parsing application/problem+json (RFC 9457)
When an API error comes back as application/problem+json, that's RFC 9457 (formerly RFC 7807) problem details — a standard structured error. Parse it as JSON and read type, title, detail, status, and often an errors[] array with a pointer to the exact offending field. It's telling you precisely what's wrong — don't discard it as an opaque string.
For agents consuming webhooks and APIs
An agent that assumes a fixed payload shape breaks silently on drift, and one that ignores a problem+json body throws away the diagnosis it was handed. diagnose_infra_error returns the webhook-drift family with the fix — pin the version, fail loud on missing keys, parse the problem-details pointer:
diagnose_infra_error({error: "application/problem+json rfc9457 webhook missing field"})
// → { family: "webhook-drift",
// fix: "parse the RFC 9457 problem-details (errors[].pointer); pin the webhook API version; fail loud on missing keys" }Machine-readable guide: https://snapback.sh/llms.txt · Tool discovery: https://snapback.sh/.well-known/mcp.json · MCP endpoint: https://api.snapback.sh/mcp. Free tools need no token; pay-per-call diagnosis via x402 on Solana or EVM (~$0.0032 USDC).