# K1 Chat WebCode errors
This pure package maps every current `ServiceFailure` to one stable model-facing error code and constructs operation-typed `WebCodeOutput` failures. The codes are `state`, `authorization`, `workspace_denied`, `family_exists`, `source_unavailable`, `version_used`, `foreign_handle`, `stale_source`, `invalid_document`, `check_failed`, `source_preservation`, `public_release_denied`, `publication`, and `dependency`.
`service_error` preserves the complete safe service text and optional source Object. `error` accepts an explicit safe code/text/Object, while `simple_error` derives text by replacing underscores. The package performs no service effect, I/O, authorization, persistence, checking, or publication. Output work is linear in emitted text and metadata.