data (response payload) and lastResponse (request metadata).
All successful API responses follow this wrapper pattern for consistency and debugging.
Errors throw GridError instead of returning error objects.
Remarks
The BaseResponse wrapper provides:- data: The actual response payload from the API
- lastResponse: Request metadata for debugging and tracking
- Access response data via the
dataproperty - Track requests using
lastResponse.requestIdfor support queries - Debug issues with status codes and headers
- Implement idempotency using
lastResponse.idempotencyKey
Note: Errors are NOT returned in the response. Instead, they throw GridError with similar metadata.
Examples
Properties
| Property | Type | Description |
|---|---|---|
address | string | - |
policies | AccountPolicies | - |
gridUserId | string | - |
authentication | AuthenticationData | - |