Skip to main content
API response metadata for request tracking and debugging This response follows the standard BaseResponse wrapper with data (response payload) and lastResponse (request metadata). This provides metadata about the API request for troubleshooting and support queries.

Remarks

Use this metadata to:
  • Track requests by requestId when contacting support
  • Verify successful requests via statusCode
  • Implement retry logic based on idempotencyKey
  • Debug issues by inspecting response headers

Example

const response = await gridClient.getAccount(address);

console.log('Request ID:', response.lastResponse?.requestId);
console.log('Status:', response.lastResponse?.statusCode);
console.log('All headers:', response.lastResponse?.headers);

Properties

PropertyTypeDescription
requestIdstringUnique identifier from x-request-id header Use this when contacting support to help identify the specific request.
statusCodenumberHTTP status code (200, 201, 400, etc.) Indicates the success status of the request.
idempotencyKey?stringIdempotency key from x-idempotency-key header Used to safely retry requests without duplicate effects. Only present if the request included an idempotency key.
headersRecord<string, string>All response headers as key-value pairs Contains all HTTP headers returned by the server.