RequestRocket Documentation
API Reference

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.

CodeDescription
proxy-access-grantedProxy authentication successful - request was forwarded to target API
proxy-access-deniedProxy authentication failed - invalid proxy credential or proxyId
billing-suspendedAccount suspended due to insufficient budget (402 Payment Required)
response-too-largeResponse 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 HeaderHTTP StatusIssue LocationCommon Causes
proxy-access-denied403RequestRocket• Invalid proxy credential
• Wrong proxyId in URL
• Credential deleted or expired
proxy-access-granted200-299None✅ Everything working correctly
proxy-access-granted400Target API• Invalid request format
• Missing required parameters
• Invalid data types
proxy-access-granted401Target API• Invalid target credential
• Expired target credential
• Insufficient permissions
proxy-access-granted403Target API or Rules• Authorization rule denied request
• Target API denied access
• IP restrictions
proxy-access-granted404Target API• Target endpoint doesn't exist
• Invalid path or method
proxy-access-granted429Target API or Proxy• Rate limit exceeded
• Too many requests
proxy-access-granted500-599Target API• Target API internal error
• Target API unavailable
billing-suspended402RequestRocket• Insufficient account budget
• Payment method required
response-too-large413RequestRocket• Response exceeds 6MB limit
• Need pagination or filtering
No headers500RequestRocket• 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 credential

Problem: Your application cannot authenticate with RequestRocket.

Solutions:

  1. Verify you're using the correct proxy credential
  2. Check that the credential hasn't been deleted
  3. Ensure you're using the correct proxyId in the URL
  4. 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 successful

Problem: RequestRocket authenticated successfully, but the target API rejected the request.

Solutions:

  1. Verify the target credential is configured correctly
  2. Check that the target API credentials haven't expired
  3. Ensure the target credential has necessary permissions
  4. 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 request

Problem: An authorization rule blocked the request.

Solutions:

  1. Review authorization rules on the proxy credential
  2. Review authorization rules on the target credential
  3. Review authorization rules on the proxy itself
  4. Check that the path, method, headers, or query parameters match allowed rules
  5. 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 suspended

Problem: Your account has insufficient budget or requires payment.

Solutions:

  1. Add or update payment method in your account settings
  2. Contact your account administrator to resolve billing issues
  3. Check your account balance and usage
  4. 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 limit

Problem: The target API response exceeds AWS Lambda's 6MB response limit.

Solutions:

  1. Use pagination to request smaller data sets
  2. Apply filters to reduce response size
  3. Request only necessary fields if the API supports field selection
  4. For large file downloads, consider direct integration or streaming
  5. 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:

  1. Retry the request (transient errors may resolve automatically)
  2. Check RequestRocket status page for known issues
  3. 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 response
  • Content-Length: Calculated based on response size
  • Cache-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 stripped
  • Set-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)

Next Steps

On this page