Skip to main content
Zinc functions return 0 on success and negative POSIX error codes on failure. Language adapters translate these into native error types: Rust returns Result<T, ZincError>, Python raises OSError, Go returns error, and other languages throw exceptions.

Error enum

The Rust core defines a ZincError enum with these variants:

Error by scenario

When you encounter an error during development, this table can help identify the cause:

Error handling examples

Platform errors

Any system call can produce an OS-level error. These are wrapped in ZincError::Platform(io::Error). The error code returned to the caller is the negated OS error code. Common platform errors: Check return values during development. In production, handle at least AlreadyExists (fall back to open), NotFound (retry or log), and TimedOut (treat as a heartbeat miss).