Skip to main content

RebelfiError Class

All API errors are thrown as RebelfiError instances with structured information:

Properties

Checking Error Type

Use the .is() method to check for specific errors:

Error Codes

Validation Errors (4xx)

Business Logic Errors (4xx)

Resource Errors (404)

Simulation Errors (4xx)

Authentication Errors (401/403)

Rate Limiting (429)

Network Errors

Error Details by Code

Many errors include a details object with structured context. Here are the fields returned for each error code:

Transaction Failure Codes

When a transaction fails, check the failureCode for details:

Error Handling Patterns

Comprehensive Handler

Retry with Backoff

Operation Expiry Handling

Next Steps

TypeScript Reference

Complete type definitions

API Reference

REST API documentation