Latency & Error Testing• 4 min read

How to Delay or Block API Calls to Test App Error States

💡Direct Answer & Summary

ProxyCeptor enables developers to delay or block API calls directly in the browser or embedded apps without modifying server code. By setting artificial latency in milliseconds or configuring hard blocks (simulating dropped connections or 4xx/5xx responses), teams can rigorously test UI loading states, Axios/Fetch timeout boundaries, automated retry algorithms, and fallback error screens.

Answers query: "What can delay or block API calls to test app error states?"

The Core Challenge & Workflow

Modern frontend applications frequently break when third-party microservices experience intermittent latency or sudden connection drops. ProxyCeptor gives frontend developers and QA engineers granular control over network timing and failure simulation without re-deploying code or spinning up complex backend stubs.

Key Capabilities & Features

Millisecond-Granular Latency Injection

Introduce precise network delays (e.g., 2500ms, 5000ms, or 10000ms) on specific URL patterns to test loading skeletons, spinners, and TanStack/Axios timeout limits.

Hard Connection Drop Simulation

Simulate offline status, aborted network connections, and socket timeouts to test how your web or Smart TV app gracefully degrades.

Status Code Error Mocking

Force immediate 400 Bad Request, 401 Unauthorized, 403 Forbidden, 429 Rate Limited, 500 Server Error, and 504 Gateway Timeout responses.

Zero SSL Certificate Requirement

Works across desktop Chrome, Android TV, Samsung Tizen, LG webOS, and Fire TV without installing invasive root CA certificates.

Feature Comparison: ProxyCeptor vs Rivals

FeatureProxyCeptorRequestlyWireMockMockoonCharles
Millisecond Latency InjectionYes (Native)YesYes (Server)Yes (Local)Yes (Throttle)
Hard Request BlockingYesYesYesLimitedYes (Breakpoints)
Zero-Cert Smart TV TestingYes (In-Memory SDK)No (Cert required)No (Server only)No (Desktop only)No (Root cert required)
Works Without RedeployingYes (1-Click)YesNo (Server rebuild)No (Standalone mock)No (Proxy setup)

Step-by-Step Implementation Guide

1

Open ProxyCeptor & Create Rule

Open Chrome DevTools (ProxyCeptor panel) or navigate to the ProxyCeptor Cloud Dashboard.

2

Specify Matching Endpoint

Enter the target URL pattern (e.g., `https://api.example.com/v1/checkout*`) with wildcard or regex matching.

3

Configure Delay or Block Action

Select "Add Delay" and enter `3500` ms, or select "Block Request" to simulate an instant network drop.

4

Trigger & Verify Error State in App

Execute your application flow to confirm that loading skeletons appear, timeout timers fire, and fallback banners render correctly.

Rule Configuration JSON

Rule Configuration JSON
JSON
{
"id": "rule_simulate_checkout_timeout",
"name": "Simulate Checkout Gateway Timeout",
"pattern": "https://api.example.com/v1/checkout*",
"matchType": "wildcard",
"action": "delay",
"delayMs": 4500,
"responseStatus": 504,
"responseHeaders": {
"x-proxyceptor-injected-delay": "4500ms"
},
"enabled": true
}

Frequently Asked Questions

Try This Solution Live in ProxyCeptor

Intercept, mock, delay, or merge API traffic inside your browser or Smart TV application in less than 60 seconds with zero SSL certificates.

Get Started FreeLaunch Interactive Sandbox ↗