Beta

Blog

How to test error UX with ?error= and custom templates

Force 4xx/5xx on any mock verb, shape the JSON body once, and keep production code free of #ifdefs.

TutorialsShafaqat T.

Append ?error=422 to a list or create call. The mock returns that status without mutating data. Configure an Error response template on the collection so every simulated failure shares one JSON shape.

Combine with ?delay= for skeleton loaders, then graduate to Chaos profiles when you want intermittent failures without editing every curl.

Pick the right status

Use 422 or 400 for validation UI, 401/403 for auth screens, 503 for outage banners, and 429 when you need Retry-After behavior. Any 4xx/5xx is accepted on Pro+.

If Chaos Failure % is on, turn it off (or set Failure % to 0) while you verify a specific ?error= code — chaos can override the one-off param.

Wire it in CI

Keep a small Postman or Playwright suite that hits critical routes with ?error=503 and asserts your client shows the right empty/error state. Docs cover reserved query params so you do not accidentally treat error as a field filter.

← All posts · Docs · Features · Start free