The Suki SDK provides a structured and consistent error handling system to help you gracefully manage errors such as initialization failures, patient creation issues, and note submission problems.All errors emitted by the SDK follow a consistent structure with error codes, names, and optional reasons to help you debug efficiently.
You can listen for SDK-wide errors by subscribing to the “error” event using either the SukiClient instance (JavaScript) or the useSuki hook (React). This allows you to log and respond to issues across authentication, session management, or note handling.
Copy
Ask AI
const unsubscribeError = sdkClient.on( "error", (error) => { console.error("SDK error occurred:", error); // You can use error.code, error.details.name, and error.details.reason },);