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
- https://docs.zapier.com/platform/reference/cli-docs
- https://github.com/zapier/zapier-platform/blob/main/packages/core/src/http-middlewares/after/throw-for-status.js
- https://github.com/zapier/zapier-platform/blob/main/packages/core/src/http-middlewares/after/prepare-response.js
Have your agent know this before it fails
claude mcp add --transport http footgun https://getfootgun.com/api/mcp