Error Handling

Learn how to handle errors and edge cases when using the Finatic SDK.

Understanding how to handle errors is crucial for building robust applications with Finatic. This guide covers error handling patterns, common error types, and best practices.

Response Format

All Finatic API methods return a consistent response format:

1{ 2 success: { 3 data: { /* your data */ }, 4 meta?: { /* optional metadata */ } 5 }, 6 error: null, 7 warning: null 8} 9

On error:

1{ 2 success: null, 3 error: { 4 message: "Error description", 5 code?: "ERROR_CODE", 6 status?: 400, 7 details?: { /* additional error details */ } 8 }, 9 warning: null 10} 11

Basic Error Handling

Always check for errors before accessing data. Here's an example using getAccounts():

Loading...