Skip to main content
Every SDK method returns an ApiResponse<T> envelope. Check status and data after each call.
interface ApiResponse<T> {
  status: number;
  message: string;
  data: T;
  error?: {
    code: string;
    message: string;
    details?: unknown;
  } | null;
}

Basic pattern

Error handling
const response = await blnk.Ledgers.create({
  name: 'Customer accounts',
});

if (response.status !== 201 || !response.data) {
  throw new Error(response.message);
}

Common failures

ModestatusWhat happened
Core errorCore statusCore returned a non-2xx response.
Client validation400The SDK rejected invalid input before sending the request.
Timeout408The request exceeded the configured timeout.
Network error500The SDK could not reach Core.
Use Client options to adjust timeout and retry behavior.