Common issues, debugging techniques, and solutions for Mock API Builder problems.
GET /api/proj_abc123/users → 404 Not Found
1. Verify Project Slug
2. Check Endpoint Configuration
3. Use Built-in Tester
Go to Project → API Tester to test endpoints without manually typing URLs
GET /api/proj_abc123/users → 401 Unauthorized
1. Get Your API Token
2. Include Token in Request
3. Disable Auth (for testing)
Go to Project → Settings → Authentication → Toggle off "Require authentication"
Access to fetch at 'http://localhost:3000/api/...' has been blocked by CORS policy
Cross-Origin Resource Sharing (CORS) is a browser security feature that restricts web pages from making requests to a different domain than the one that served the page.
1. Mock API Builder Handles CORS Automatically
All API endpoints automatically include CORS headers. This error usually means a different issue.
2. Check Your Request URL
3. For Production Deployments
If deploying Mock API Builder, configure allowed origins:
SyntaxError: Unexpected token < in JSON at position 0
1. Check Response Status Code
2. Validate Your Schema
3. Check Logs for Errors
The Logs tab will show if there's an error generating mock data from your schema
HTTP 429 - Rate limit exceeded. Retry after 60 seconds
You've made too many requests in a short time period. Rate limiting prevents abuse and ensures fair usage.
1. Wait and Retry
2. Check Rate Limit Headers
3. Adjust Rate Limits (Project Owner)
4. Implement Request Throttling
Add delays between requests or use request batching to stay under limits
API responses taking longer than 500ms or timing out
1. Reduce Mock Data Count
2. Simplify Schema
3. Enable Caching
4. Check Database Status
View Logs tab for database connection errors or slow query warnings
5. Monitor Performance
Data isn't persisting after POST/PUT requests
1. Enable Stateful Mocking
2. Check State Keys
Ensure POST (write) and GET (read) endpoints use the exact same stateKey (e.g., "users").
Getting wrong data or variables not resolving
1. Specify Environment
2. Check Variable Syntax
Use {{env.variableName}} in your schema or mock data.
Network Tab
Console Tab
Every request is logged with details:
→ Project → Logs tab
Eliminate browser variables by testing from command line:
Built-in tester helps isolate issues:
→ Project → API Tester tab
All errors from Mock API Builder follow a consistent JSON format:
| Code | Status | Meaning |
|---|---|---|
| INVALID_REQUEST | 400 | Request data is malformed or invalid |
| UNAUTHORIZED | 401 | Missing or invalid authentication |
| FORBIDDEN | 403 | No permission to access resource |
| NOT_FOUND | 404 | Resource doesn't exist |
| VALIDATION_ERROR | 422 | Data failed validation rules |
| RATE_LIMIT_EXCEEDED | 429 | Too many requests |
| INTERNAL_ERROR | 500 | Server error occurred |
Browse our comprehensive guides:
Learn from working examples:
Step-by-step guides for common use cases
See frequently asked questions:
Answers to common questions and issues
Still stuck? We're here to help:
• Email: support@mockapibuilder.io
• GitHub Issues (for bugs)
• Discord Community