Overview
SukiError type represents the structure for SDK errors. The code snippet below shows how to use theSukiError type to create a suki error object.
JavaScript
Properties
ErrorCode Identifier
ErrorCode represents the unique identifiers for different types of SDK errors. The following table lists the available error code identifiers and their descriptions.| Code | Name | Category | Description |
|---|---|---|---|
SUKI0001 | init:sdk-init-failed | Initialization | SDK initialization failed |
SUKI0002 | init:auth-failed | Authentication | User authentication failed |
SUKI0003 | init:mount-failed | Initialization | SDK mounting to DOM failed |
SUKI0004 | init:messenger-failed | Initialization | Internal messaging system failed |
SUKI0005 | init:invalid-options | Initialization | Invalid initialization options provided |
SUKI0006 | navigate:failed | Navigation | Navigation within SDK failed |
SUKI0007 | create-appointment:failed | Encounter | Failed to create appointment/encounter |
SUKI0008 | get-appointment:failed | Encounter | Failed to retrieve appointment/encounter |
SUKI0009 | create-patient:failed | Patient | Failed to create patient record |
SUKI0010 | update-patient:failed | Patient | Failed to update patient information |
SUKI0011 | get-patient:failed | Patient | Failed to retrieve patient information |
SUKI0012 | note-submission:failed | Notes | Failed to submit clinical note |
SUKI0013 | ambient-fail | Ambient | Ambient session operation failed |
SUKI0014 | encounter-fail | Encounter | General encounter operation failed |
SUKI0015 | token-update-fail | Authentication | Failed to update partner token |
SUKI0016 | unsupported-loinc-codes | Configuration | Provided LOINC codes are not supported |
SUKI0017 | no-supported-loinc-codes | Configuration | No supported LOINC codes found in configuration |
SUKI0018 | multiple-pbn-sections | Configuration | Multiple sections marked as PBN (Problem-Based Note) |
ErrorDetail
ErrorDetail represents the detailed information about a specific error. The code snippet below shows how to use theErrorDetail type to create a error detail object.
JavaScript
ErrorDetail Properties
ErrorReasons
ErrorReasons represents the specific reasons that provide additional context for why an error occurred.JavaScript
| Reason | Category | Description |
|---|---|---|
already-started | State | Operation attempted when already in progress |
ambient-in-progress | Ambient | Cannot perform action while ambient session is active |
invalid-encounter | Data | Provided encounter data is invalid or malformed |
lib-error | System | Internal library or system error |
missing-partner-details | Configuration | Required partner authentication details are missing |
multiple-pbn-sections | Configuration | Multiple sections marked as PBN when only one is allowed |
no-ambient | State | No ambient session available for operation |
no-init | State | SDK not initialized before operation attempted |
no-init-or-auth | Authentication | SDK not initialized or user not authenticated |
no-partner-token | Authentication | Partner token is missing or invalid |
no-supported-loinc-codes | Configuration | No supported LOINC codes found |
service-error | Network | External service or API error |
unsupported-loinc-codes | Configuration | Provided LOINC codes are not supported |