Playground API
DocsStatsBlogStudio
Documentation Tree
Technical BlogFeature Deep Dives
  • Introduction
  • Quickstart
    5 min
  • How It Works
  • Recipes & Cookbooks
  • Platform Comparisons
  • Real-World Showcase
  • Interactive Studio
    Studio
  • GraphiQL IDE
    IDE
  • Session Quotas & Activity
  • Network Chaos Simulator
  • Atomic Sandbox Reset
  • Overview & Models
    Hub
  • Users Resource
  • Posts Resource
  • Comments Resource
  • Todos Resource
  • Custom Collections
    Custom
  • Multipart File Uploads
    Upload
  • Dynamic SVG Avatars
    SVG
  • Image Thumbnails
    CDN
  • Relational Filtering
  • Full-Text Search
  • Dynamic Sorting
  • Offset Pagination
  • Cursor Pagination
    Scroll
  • CSV & Excel Export & Import
    IO
  • Custom Collections
    CRUD
  • Overview & Architecture
    Hub
  • JWT Auth Flow
  • Refresh Token Rotation
    Mutex
  • RBAC Permission Matrix
    Roles
  • Expiry Simulation
  • Clock Skew Drift
  • Password Recovery Loop
  • Dual-Mode Sandboxing
  • GraphiQL IDE
    IDE
  • Relational Queries
  • Stateful Mutations
  • Realtime Subscriptions
  • Overview & Flowcharts
    Hub
  • Hosted Checkout
    Stripe
  • Payment Intents API
  • 3DS Challenge Modal
    Modal
  • Customers Vault
  • Charges & Refunds
  • Test Cards Catalog
  • Overview & Channels
    Hub
  • Virtual Email Mailbox
    Mailtrap
  • Virtual SMS Terminal
    Phone
  • In-App Notifications
  • Message Dispatcher
  • Realtime Studio
    Studio
  • Native WebSocket (/ws)
  • Socket.io Gateway
  • Presence & Echo Bot
  • Server-Sent Events (SSE)
    SSE
  • Analytics Telemetry
  • Webhook Subscriptions
  • HMAC SHA-256 Signatures
  • Delivery Logs
  • Manual Retry Simulator
  • Network Latency Delay
  • HTTP Status Codes
  • Rate-Limit Simulator
    429
  • Flaky Network & Jitter
    Chaos
  • Session Quotas & Activity
  • JSON Snapshots
    JSON
  • Headless CI/CD Testing
    CI
  • Mobile QR Code Sync
  • System Metrics & Health
  • Atomic Sandbox Reset
  • Official TypeScript SDK
  • Multi-Language Generators
  • DevTools Extension
  • OpenAPI 3.1 Spec
    JSON
  • Postman Collection v2.1
  • Bruno Collection
  • Insomnia Workspace
  • TypeScript .d.ts
    .d.ts
  • AI Prompt Rules
    Rules
  • Context Index (llms.txt)
  • Full Schema (llms-full.txt)
  • Manifest (product.json)
  • All Feature Articles
    Blog
  • React CRUD Without Backend
    Deep Dive
  • Why Static APIs Fail
  • Mocking Stateful Auth
  • WebSockets & SSE Guide
Technical Blog
Articles

In-depth articles explaining stateful mock APIs, WebSockets, payments, and frontend resilience.

Read Articles
PreviousNetwork Latency Delay
NextRate-Limit Simulator
Chaos & Fault Injection

Arbitrary HTTP Status Code Injection

Force the API to return any standard HTTP error code using ?_status=... or the X-Simulate-Status header. Test React error boundaries, form validation errors, authorization fallbacks, and server outage alerts.

Interactive Status Code Runner

Select a target status code and click "Send" to inspect the generated RFC-compliant error payload:

4xx Client Error Simulations
5xx Server Error Simulations

Simulate HTTP 500

Forces server to return HTTP 500 with RFC-compliant error payload.

GET
response.json
1
{
2
// Click "Send" above to execute this request against the live server.
3
}

Supported HTTP Status Code Reference

CodeStandard NameTypical Trigger ScenarioRecommended Frontend Action
400Bad RequestMalformed JSON body or invalid query syntax.Display inline form field validation errors.
401UnauthorizedMissing or expired JWT bearer token.Trigger token refresh or redirect to login.
403ForbiddenUser lacks required RBAC role permissions.Show "Upgrade Plan" or permissions banner.
404Not FoundTarget resource ID does not exist in dataset.Render 404 empty state page with navigation.
429Too Many RequestsRate limit window exceeded.Read Retry-After and pause requests.
500Internal Server ErrorUncaught backend exception or database failure.Trigger React Error Boundary fallback view.
503Service UnavailableScheduled maintenance or downstream outage.Activate circuit breaker and retry with backoff.

Frontend Error Handling Recipes

Production patterns for catching simulated errors gracefully in modern web apps:

error.tsx
1
// React 19 / Next.js Error Boundary (error.tsx)
2
'use client';
3
4
import { useEffect } from 'react';
5
6
export default function ErrorBoundary({
7
error,
8
reset,
9
}: {
10
error: Error & { digest?: string; status?: number };
11
reset: () => void;
12
}) {
13
useEffect(() => {
14
console.error('Captured by Error Boundary:', error);
15
}, [error]);
16
17
return (
18
<div className="p-8 max-w-lg mx-auto text-center space-y-4">
19
<div className="w-12 h-12 rounded-full bg-rose-100 text-rose-600 flex items-center justify-center mx-auto">
20
⚠️
21
</div>
22
<h2 className="text-xl font-bold text-slate-900">Something went wrong!</h2>
23
<p className="text-sm text-slate-600">
24
{error.message || 'An unexpected server error occurred.'}
25
</p>
26
<button
27
onClick={() => reset()}
28
className="px-4 py-2 bg-indigo-600 text-white text-sm font-semibold rounded-xl"
29
>
30
Try Again
31
</button>
32
</div>
33
);
34
}

Testing quota boundaries and rate limiting?

Simulate HTTP 429 Too Many Requests and parse compliant Retry-After headers.

View Rate-Limit Simulator