Zapier · sdk · fg-0382

Zapier z.request throws on every 4xx before your code can read the error body

ResponseError thrown from z.request for a 4xx status

Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100

Cause

Since core 10.0.0 z.request calls throwForStatus on every response of 400 or more before returning it, unless skipThrowForStatus is set.

Fix

Set skipThrowForStatus on requests where you need the body, then throw a z.errors.Error with a readable message.

Apply

const res = await z.request({ url, method: 'POST', body, skipThrowForStatus: true });
if (res.status >= 400) throw new z.errors.Error(res.json.message, 'ApiError', res.status);

Affects: zapier-platform-core 10.0.0 and later

Sources

Have your agent know this before it fails

claude mcp add --transport http footgun https://getfootgun.com/api/mcp