RaidHubResponse format. This consistent structure makes it easy to handle both successful and error responses uniformly across your application.
Response Structure
TheRaidHubResponse is a discriminated union that can represent either a successful response or an error response, differentiated by the success field.
Success Response
When a request succeeds, the response follows this structure:ISO 8601 timestamp indicating when the response was generated
Always
true for successful responsesThe actual response data. The structure varies by endpoint.
Example Success Response
Error Response
When a request fails, the response follows this structure:ISO 8601 timestamp indicating when the error response was generated
Always
false for error responsesThe error code identifying the type of error. See Error Handling for all error codes.
Additional error details. The structure varies by error code.
Example Error Response
Handling Responses
To handle RaidHub API responses in your code, check thesuccess field:
The
minted timestamp is included in all responses and indicates when the response was generated by the RaidHub API. This can be useful for debugging, caching, or understanding data freshness.Type Safety
For TypeScript users, the RaidHubResponse is defined as:success field, providing excellent autocomplete and type safety.