Skip to main content

Module codes

Module codes 

Source
Expand description

Reserved error-code constants for failures originating inside the SDK itself (client-side validation, I/O, timeouts, external/toolkit calls).

These never overlap with codes emitted by the Zhipu AI API (documented range 10001499). Every value lives in the reserved 90009999 band, so a caller can distinguish “the server rejected this” (10001499) from “the SDK failed before/after the server replied” (90009999) via ZaiError::code / ZaiError::is_sdk_error.

Constants§

SDK_CONFIG
Client-side configuration error (bad base URL, missing value, …).
SDK_EXTERNAL_TOOL
A failure reported by an external/toolkit source (RMCP, function tool).
SDK_FILE_NOT_FOUND
A local file referenced by the request does not exist.
SDK_FILE_TOO_LARGE
A local file exceeds the SDK/enforced size limit.
SDK_FILE_TYPE_UNSUPPORTED
The file type/extension is not supported by the target tool.
SDK_IO
Generic local I/O failure (read/write/permission, …).
SDK_TIMEOUT
A client-side timeout (e.g. polling an async task for too long).
SDK_VALIDATION
Generic client-side validation failure (bad argument shape, …).