Response Headers
Understanding RequestRocket response headers and troubleshooting
Response Headers
RequestRocket adds custom headers to all Proxy API and Async API responses to help you understand the request flow and troubleshoot issues.
Standard Response Headers
requestrocket-proxy-code
Indicates the status of your request through the proxy layer.
| Code | Description |
|---|---|
proxy-access-granted | Proxy authentication successful - request was forwarded to target API |
proxy-access-denied | Proxy authentication failed - invalid proxy credential or proxyId |
billing-suspended | Account suspended due to insufficient budget (402 Payment Required) |
response-too-large | Response from target API exceeds 6MB limit (413 Payload Too Large) |
requestrocket-proxy-message
Provides a human-readable description of the proxy code.
Examples:
"Proxy authentication successful""Invalid proxy credential""Payment Required - Account suspended due to insufficient budget""Response payload exceeds 6MB limit"
requestrocket-proxy-warning
Provides warning messages about your account or request status that require attention but don't prevent the request from completing.
Examples:
"Low budget - please add a valid payment method to continue using the API""Approaching rate limit threshold"
Understanding Response Headers
The requestrocket-proxy-code header is key to understanding where an issue occurred. If you see proxy-access-granted with an error response, the issue is with the target API, target credential, or request format - NOT the proxy authentication.
Response Analysis Guide
Use this table to quickly diagnose issues based on response headers and status codes:
| Proxy Code Header | HTTP Status | Issue Location | Common Causes |
|---|---|---|---|
proxy-access-denied | 403 | RequestRocket | • Invalid proxy credential • Wrong proxyId in URL • Credential deleted or expired |
proxy-access-granted | 200-299 | None | ✅ Everything working correctly |
proxy-access-granted | 400 | Target API | • Invalid request format • Missing required parameters • Invalid data types |
proxy-access-granted | 401 | Target API | • Invalid target credential • Expired target credential • Insufficient permissions |
proxy-access-granted | 403 | Target API or Rules | • Authorization rule denied request • Target API denied access • IP restrictions |
proxy-access-granted | 404 | Target API | • Target endpoint doesn't exist • Invalid path or method |
proxy-access-granted | 429 | Target API or Proxy | • Rate limit exceeded • Too many requests |
proxy-access-granted | 500-599 | Target API | • Target API internal error • Target API unavailable |
billing-suspended | 402 | RequestRocket | • Insufficient account budget • Payment method required |
response-too-large | 413 | RequestRocket | • Response exceeds 6MB limit • Need pagination or filtering |
| No headers | 500 | RequestRocket | • Internal RequestRocket error • Contact support |
Troubleshooting by Scenario
Scenario 1: proxy-access-denied
HTTP/1.1 403 Forbidden
requestrocket-proxy-code: proxy-access-denied
requestrocket-proxy-message: Invalid proxy credentialProblem: Your application cannot authenticate with RequestRocket.
Solutions:
- Verify you're using the correct proxy credential
- Check that the credential hasn't been deleted
- Ensure you're using the correct proxyId in the URL
- Confirm the credential format matches the auth type (API Key, Bearer, etc.)
Scenario 2: proxy-access-granted with 401/403
HTTP/1.1 401 Unauthorized
requestrocket-proxy-code: proxy-access-granted
requestrocket-proxy-message: Proxy authentication successfulProblem: RequestRocket authenticated successfully, but the target API rejected the request.
Solutions:
- Verify the target credential is configured correctly
- Check that the target API credentials haven't expired
- Ensure the target credential has necessary permissions
- Review target API documentation for authentication requirements
Scenario 3: proxy-access-granted with 403 (Authorization Rules)
HTTP/1.1 403 Forbidden
requestrocket-proxy-code: proxy-access-granted
requestrocket-proxy-message: Authorization rule denied requestProblem: An authorization rule blocked the request.
Solutions:
- Review authorization rules on the proxy credential
- Review authorization rules on the target credential
- Review authorization rules on the proxy itself
- Check that the path, method, headers, or query parameters match allowed rules
- Verify the default rule effect (allow/deny) is set correctly
Scenario 4: billing-suspended
HTTP/1.1 402 Payment Required
requestrocket-proxy-code: billing-suspended
requestrocket-proxy-message: Payment Required - Account suspendedProblem: Your account has insufficient budget or requires payment.
Solutions:
- Add or update payment method in your account settings
- Contact your account administrator to resolve billing issues
- Check your account balance and usage
- If you believe this is an error, contact support
Scenario 5: response-too-large
HTTP/1.1 413 Payload Too Large
requestrocket-proxy-code: response-too-large
requestrocket-proxy-message: Response payload exceeds 6MB limitProblem: The target API response exceeds AWS Lambda's 6MB response limit.
Solutions:
- Use pagination to request smaller data sets
- Apply filters to reduce response size
- Request only necessary fields if the API supports field selection
- For large file downloads, consider direct integration or streaming
- Contact support about Business tier options for large data handling
Scenario 6: No RequestRocket Headers
HTTP/1.1 500 Internal Server Error
(no requestrocket-proxy-code header)Problem: Internal RequestRocket error before proxy processing.
Solutions:
- Retry the request (transient errors may resolve automatically)
- Check RequestRocket status page for known issues
- Contact support with the request details and timestamp
Header Forwarding
Headers Added by RequestRocket
In addition to the custom requestrocket-* headers, RequestRocket preserves most headers from the target API response and adds standard headers:
Content-Type: Preserved from target responseContent-Length: Calculated based on response sizeCache-Control: Set based on proxy configuration- Standard CORS headers (if configured)
Headers NOT Forwarded
For security and operational reasons, certain headers are not forwarded from the target API:
Authorization: Target API authorization headers are strippedSet-Cookie: Cookies are not forwarded (stateless proxy design)- Certain infrastructure headers (
X-Amz-*,X-Forwarded-*)
Example: Header Inspection
const response = await fetch('https://us-east-1.requestrocket.com/api/abc123/users', {
headers: { 'Authorization': 'Bearer your-proxy-token' }
});
// Check RequestRocket headers
const proxyCode = response.headers.get('requestrocket-proxy-code');
const proxyMessage = response.headers.get('requestrocket-proxy-message');
const proxyWarning = response.headers.get('requestrocket-proxy-warning');
console.log(`Proxy Status: ${proxyCode}`);
console.log(`Message: ${proxyMessage}`);
if (proxyWarning) {
console.warn(`Warning: ${proxyWarning}`);
}
if (proxyCode !== 'proxy-access-granted') {
throw new Error(`Proxy authentication failed: ${proxyMessage}`);
}
if (!response.ok) {
console.error(`Target API error: ${response.status} ${response.statusText}`);
}import requests
response = requests.get(
'https://us-east-1.requestrocket.com/api/abc123/users',
headers={'Authorization': 'Bearer your-proxy-token'}
)
# Check RequestRocket headers
proxy_code = response.headers.get('requestrocket-proxy-code')
proxy_message = response.headers.get('requestrocket-proxy-message')
proxy_warning = response.headers.get('requestrocket-proxy-warning')
print(f"Proxy Status: {proxy_code}")
print(f"Message: {proxy_message}")
if proxy_warning:
print(f"Warning: {proxy_warning}")
if proxy_code != 'proxy-access-granted':
raise Exception(f"Proxy authentication failed: {proxy_message}")
if not response.ok:
print(f"Target API error: {response.status_code} {response.reason}")package main
import (
"fmt"
"io"
"net/http"
)
func main() {
client := &http.Client{}
req, _ := http.NewRequest("GET", "https://us-east-1.requestrocket.com/api/abc123/users", nil)
req.Header.Set("Authorization", "Bearer your-proxy-token")
resp, _ := client.Do(req)
defer resp.Body.Close()
// Check RequestRocket headers
proxyCode := resp.Header.Get("requestrocket-proxy-code")
proxyMessage := resp.Header.Get("requestrocket-proxy-message")
proxyWarning := resp.Header.Get("requestrocket-proxy-warning")
fmt.Printf("Proxy Status: %s\n", proxyCode)
fmt.Printf("Message: %s\n", proxyMessage)
if proxyWarning != "" {
fmt.Printf("Warning: %s\n", proxyWarning)
}
if proxyCode != "proxy-access-granted" {
panic(fmt.Sprintf("Proxy authentication failed: %s", proxyMessage))
}
if resp.StatusCode >= 400 {
fmt.Printf("Target API error: %d %s\n", resp.StatusCode, resp.Status)
}
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}import java.net.http.*;
import java.net.URI;
public class CheckHeaders {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://us-east-1.requestrocket.com/api/abc123/users"))
.header("Authorization", "Bearer your-proxy-token")
.GET()
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
// Check RequestRocket headers
String proxyCode = response.headers()
.firstValue("requestrocket-proxy-code").orElse("");
String proxyMessage = response.headers()
.firstValue("requestrocket-proxy-message").orElse("");
String proxyWarning = response.headers()
.firstValue("requestrocket-proxy-warning").orElse("");
System.out.println("Proxy Status: " + proxyCode);
System.out.println("Message: " + proxyMessage);
if (!proxyWarning.isEmpty()) {
System.out.println("Warning: " + proxyWarning);
}
if (!"proxy-access-granted".equals(proxyCode)) {
throw new Exception("Proxy authentication failed: " + proxyMessage);
}
if (response.statusCode() >= 400) {
System.err.println("Target API error: " + response.statusCode());
}
System.out.println(response.body());
}
}# Use -i to include headers in output
curl -i -X GET "https://us-east-1.requestrocket.com/api/abc123/users" \
-H "Authorization: Bearer your-proxy-token"
# Look for these headers in the response:
# requestrocket-proxy-code: proxy-access-granted
# requestrocket-proxy-message: Proxy authentication successful
# requestrocket-proxy-warning: (if any)