ErrorCode class
ErrorCode — exhaustive enumeration of every distinct numeric error code in
the C ABI (rac_result_t).
proto3 forbids negative enum values, so the proto enum holds POSITIVE
values that mirror the absolute magnitude of each C ABI code. The signed
rac_result_t numeric value is preserved on SDKError.c_abi_code so
platforms can round-trip the original C ABI integer. The naming scheme is:
ERROR_CODE_<NAME> = abs(RAC_ERROR_<NAME>)
(e.g. RAC_ERROR_MODEL_NOT_FOUND = -110 → ERROR_CODE_MODEL_NOT_FOUND = 110)
ERROR_CODE_UNSPECIFIED = 0 covers proto3's required zero-default; the
C ABI's RAC_SUCCESS = 0 is NOT an error and MUST NOT appear inside an
SDKError.code (an SDKError implies a failure; success is signalled by the
absence of an SDKError). The zero-value enum entry exists only because
proto3 mandates it.
CRITICAL: Do not change the numeric values without coordinated migrations across every SDK and the C ABI. Adding new values is safe; removing or renumbering is a wire-format break.
All values below are sourced from
sdk/runanywhere-commons/include/rac/core/rac_error.h. Aliases (codes
where the C ABI defines two distinct macro names for the same numeric
value) are documented inline; we pick one canonical name per numeric value
to keep proto enum values unique.
- Available extensions
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isExpected → bool
-
Available on ErrorCode, provided by the ErrorCodeClassification extension
Whether this error is expected/routine and shouldn't be logged as error.no setter - name → String
-
This enum's name, as specified in the .proto file.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → int
-
This enum's integer value, as specified in the .proto file.
finalinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
Returns this enum's
nameor thevalueif names are not represented.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- ERROR_CODE_ABI_VERSION_MISMATCH → const ErrorCode
- -- Plugin (-810..-829) ------------------------------------------------
- ERROR_CODE_ADAPTER_NOT_SET → const ErrorCode
- -- Platform adapter (-500..-599) --------------------------------------
- ERROR_CODE_ALREADY_INITIALIZED → const ErrorCode
- ERROR_CODE_AUDIO_FORMAT_NOT_SUPPORTED → const ErrorCode
- -- Audio (-280..-299) -------------------------------------------------
- ERROR_CODE_AUDIO_SESSION_ACTIVATION_FAILED → const ErrorCode
- ERROR_CODE_AUDIO_SESSION_FAILED → const ErrorCode
- ERROR_CODE_AUTHENTICATION_FAILED → const ErrorCode
- -- Authentication (-320..-329) ----------------------------------------
- ERROR_CODE_BACKEND_BUSY → const ErrorCode
- ERROR_CODE_BACKEND_ERROR → const ErrorCode
- ERROR_CODE_BACKEND_INIT_FAILED → const ErrorCode
- ERROR_CODE_BACKEND_NOT_FOUND → const ErrorCode
- -- Backend (-600..-699) -----------------------------------------------
- ERROR_CODE_BACKEND_NOT_READY → const ErrorCode
- ERROR_CODE_BACKEND_UNAVAILABLE → const ErrorCode
- ERROR_CODE_BUFFER_TOO_SMALL → const ErrorCode
- ERROR_CODE_CALIBRATION_FAILED → const ErrorCode
- -- Calibration (-370..-379) -------------------------------------------
- ERROR_CODE_CALIBRATION_TIMEOUT → const ErrorCode
- ERROR_CODE_CANCELLED → const ErrorCode
- -- Cancellation (-380..-389) ------------------------------------------
- ERROR_CODE_CAPABILITY_NOT_FOUND → const ErrorCode
- ERROR_CODE_CAPABILITY_UNSUPPORTED → const ErrorCode
- ERROR_CODE_CHECKSUM_MISMATCH → const ErrorCode
- ERROR_CODE_COMPONENT_NOT_READY → const ErrorCode
- -- Component state (-230..-249) ---------------------------------------
- ERROR_CODE_CONNECTION_LOST → const ErrorCode
- ERROR_CODE_CONTEXT_TOO_LONG → const ErrorCode
- ERROR_CODE_COST_LIMIT_EXCEEDED → const ErrorCode
- ERROR_CODE_DECODING_ERROR → const ErrorCode
- ERROR_CODE_DELETE_FAILED → const ErrorCode
- ERROR_CODE_DIRECTORY_CREATION_FAILED → const ErrorCode
- ERROR_CODE_DIRECTORY_NOT_FOUND → const ErrorCode
- ERROR_CODE_DOWNLOAD_FAILED → const ErrorCode
- ERROR_CODE_EMPTY_AUDIO_BUFFER → const ErrorCode
- ERROR_CODE_EMPTY_INPUT → const ErrorCode
- ERROR_CODE_ENCODING_ERROR → const ErrorCode
- ERROR_CODE_ENVIRONMENT_MISMATCH → const ErrorCode
- ERROR_CODE_EVENT_INVALID_CATEGORY → const ErrorCode
- -- Event (-700..-799) -------------------------------------------------
- ERROR_CODE_EVENT_PUBLISH_FAILED → const ErrorCode
- ERROR_CODE_EVENT_SUBSCRIPTION_FAILED → const ErrorCode
- ERROR_CODE_EXTRACTION_FAILED → const ErrorCode
- -- Extraction (-350..-369) --------------------------------------------
- ERROR_CODE_FEATURE_NOT_AVAILABLE → const ErrorCode
- ERROR_CODE_FILE_NOT_FOUND → const ErrorCode
- ERROR_CODE_FILE_READ_FAILED → const ErrorCode
- ERROR_CODE_FILE_WRITE_FAILED → const ErrorCode
- ERROR_CODE_FORBIDDEN → const ErrorCode
- ERROR_CODE_FRAMEWORK_NOT_AVAILABLE → const ErrorCode
- ERROR_CODE_GENERATION_CANCELLED → const ErrorCode
- ERROR_CODE_GENERATION_FAILED → const ErrorCode
- -- Generation (-130..-149) --------------------------------------------
- ERROR_CODE_GENERATION_TIMEOUT → const ErrorCode
- ERROR_CODE_HARDWARE_UNSUPPORTED → const ErrorCode
- -- Hardware (-220..-229) -----------------------------------------------
- ERROR_CODE_HTTP_ERROR → const ErrorCode
- ERROR_CODE_HTTP_NOT_SUPPORTED → const ErrorCode
- ERROR_CODE_HTTP_REQUEST_FAILED → const ErrorCode
- ERROR_CODE_INFERENCE_FAILED → const ErrorCode
- ERROR_CODE_INITIALIZATION_FAILED → const ErrorCode
- ERROR_CODE_INSUFFICIENT_AUDIO_DATA → const ErrorCode
- ERROR_CODE_INSUFFICIENT_MEMORY → const ErrorCode
- ERROR_CODE_INSUFFICIENT_STORAGE → const ErrorCode
- -- Storage (-180..-219) ------------------------------------------------
- ERROR_CODE_INTERNAL → const ErrorCode
- ERROR_CODE_INVALID_API_KEY → const ErrorCode
- ERROR_CODE_INVALID_ARGUMENT → const ErrorCode
- ERROR_CODE_INVALID_CONFIGURATION → const ErrorCode
- ERROR_CODE_INVALID_FILE_NAME → const ErrorCode
- ERROR_CODE_INVALID_FORMAT → const ErrorCode
- ERROR_CODE_INVALID_HANDLE → const ErrorCode
- ERROR_CODE_INVALID_INPUT → const ErrorCode
- ERROR_CODE_INVALID_MODEL_FORMAT → const ErrorCode
- ERROR_CODE_INVALID_PARAMETER → const ErrorCode
- ERROR_CODE_INVALID_PATH → const ErrorCode
- ERROR_CODE_INVALID_PITCH → const ErrorCode
- ERROR_CODE_INVALID_RESPONSE → const ErrorCode
- ERROR_CODE_INVALID_SPEAKING_RATE → const ErrorCode
- ERROR_CODE_INVALID_SSML → const ErrorCode
- ERROR_CODE_INVALID_STATE → const ErrorCode
- ERROR_CODE_INVALID_VOLUME → const ErrorCode
- ERROR_CODE_KEYCHAIN_ERROR → const ErrorCode
- -- Security (-330..-349) ----------------------------------------------
- ERROR_CODE_LANGUAGE_NOT_SUPPORTED → const ErrorCode
- -- Language / voice (-300..-319) --------------------------------------
- ERROR_CODE_MICROPHONE_PERMISSION_DENIED → const ErrorCode
- ERROR_CODE_MODEL_INCOMPATIBLE → const ErrorCode
- ERROR_CODE_MODEL_LOAD_FAILED → const ErrorCode
- ERROR_CODE_MODEL_NOT_FOUND → const ErrorCode
- -- Model (-110..-129) --------------------------------------------------
- ERROR_CODE_MODEL_NOT_LOADED → const ErrorCode
- ERROR_CODE_MODEL_STORAGE_CORRUPTED → const ErrorCode
- ERROR_CODE_MODEL_VALIDATION_FAILED → const ErrorCode
- ERROR_CODE_MODULE_ALREADY_REGISTERED → const ErrorCode
- ERROR_CODE_MODULE_LOAD_FAILED → const ErrorCode
- ERROR_CODE_MODULE_NOT_FOUND → const ErrorCode
- -- Module / service (-400..-499) --------------------------------------
- ERROR_CODE_MOVE_FAILED → const ErrorCode
- ERROR_CODE_NETWORK_ERROR → const ErrorCode
- ERROR_CODE_NETWORK_UNAVAILABLE → const ErrorCode
- -- Network (-150..-179) ------------------------------------------------
- ERROR_CODE_NO_CAPABLE_PROVIDER → const ErrorCode
- ERROR_CODE_NOT_FOUND → const ErrorCode
- ERROR_CODE_NOT_IMPLEMENTED → const ErrorCode
- -- Other (-800..-899) -------------------------------------------------
- ERROR_CODE_NOT_INITIALIZED → const ErrorCode
- -- Initialization (-100..-109) -----------------------------------------
- ERROR_CODE_NOT_SUPPORTED → const ErrorCode
- ERROR_CODE_NULL_POINTER → const ErrorCode
- ERROR_CODE_OUTPUT_TRUNCATED → const ErrorCode
- ERROR_CODE_PARTIAL_DOWNLOAD → const ErrorCode
- ERROR_CODE_PERMISSION_DENIED → const ErrorCode
- ERROR_CODE_PLUGIN_BUSY → const ErrorCode
- ERROR_CODE_PLUGIN_DUPLICATE → const ErrorCode
- ERROR_CODE_PLUGIN_LOAD_FAILED → const ErrorCode
- ERROR_CODE_PROCESSING_FAILED → const ErrorCode
- ERROR_CODE_PROVIDER_NOT_FOUND → const ErrorCode
- ERROR_CODE_REQUEST_FAILED → const ErrorCode
- ERROR_CODE_RUNTIME_UNAVAILABLE → const ErrorCode
- ERROR_CODE_SECURE_STORAGE_FAILED → const ErrorCode
- ERROR_CODE_SERVER_ERROR → const ErrorCode
- ERROR_CODE_SERVICE_ALREADY_REGISTERED → const ErrorCode
- ERROR_CODE_SERVICE_BUSY → const ErrorCode
- ERROR_CODE_SERVICE_CREATE_FAILED → const ErrorCode
- ERROR_CODE_SERVICE_NOT_AVAILABLE → const ErrorCode
- ERROR_CODE_SERVICE_NOT_FOUND → const ErrorCode
- ERROR_CODE_START_FAILED → const ErrorCode
- ERROR_CODE_STORAGE_ERROR → const ErrorCode
- ERROR_CODE_STORAGE_FULL → const ErrorCode
- ERROR_CODE_STREAM_CANCELLED → const ErrorCode
- ERROR_CODE_STREAMING_NOT_SUPPORTED → const ErrorCode
- ERROR_CODE_TEMP_FILE_CREATION_FAILED → const ErrorCode
- ERROR_CODE_TEXT_TOO_LONG → const ErrorCode
- ERROR_CODE_TIMEOUT → const ErrorCode
- ERROR_CODE_TOKEN_LIMIT_EXCEEDED → const ErrorCode
- ERROR_CODE_UNAUTHORIZED → const ErrorCode
- ERROR_CODE_UNKNOWN → const ErrorCode
- ERROR_CODE_UNSPECIFIED → const ErrorCode
- ERROR_CODE_UNSUPPORTED_ARCHIVE → const ErrorCode
- ERROR_CODE_UNSUPPORTED_MODALITY → const ErrorCode
- ERROR_CODE_VALIDATION_FAILED → const ErrorCode
- -- Validation (-250..-279) --------------------------------------------
- ERROR_CODE_VOICE_NOT_AVAILABLE → const ErrorCode
- ERROR_CODE_WASM_CALLBACK_ERROR → const ErrorCode
- ERROR_CODE_WASM_LOAD_FAILED → const ErrorCode
- -- Web-only WASM codes (-900..-903) ----------------------------------- The C ABI reserves -900..-999 for future use. The Web SDK currently squats four codes here for WASM bridge failures; codegen tags these as platform=web only. They are preserved verbatim so existing Web consumers don't break, but new SDKs SHOULD NOT emit them. Source: sdk/runanywhere-web/packages/core/src/Foundation/ErrorTypes.ts:58
- ERROR_CODE_WASM_MEMORY_ERROR → const ErrorCode
- ERROR_CODE_WASM_NOT_LOADED → const ErrorCode
-
values
→ const List<
ErrorCode>