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 1000–1499). Every value lives in the reserved 9000–9999
band, so a caller can distinguish “the server rejected this”
(1000–1499) from “the SDK failed before/after the server replied”
(9000–9999) 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, …).