Exceptions & errors
Reference for the exceptions Telys raises across the SDK, server, and verify APIs, plus what each CLI exit code means.
What Telys raises, where it comes from, and how to respond. Most failures are one of a small set of exceptions; the CLI maps them onto three exit codes.
SDK exceptions
RuntimeNotInstalled
telys.runtime
load_runtime() cannot import the selected runtime.
telys runtime install, then telys runtime verify.
ImportError
telys / telys.embedding
Importing a runtime-only class (HeuristicTuner, AlgentaPooledEmbedder) without the runtime, or instantiating an Algenta embedder without the native kernel.
Install/verify the runtime; set $TELYS_KERNEL if the kernel is elsewhere.
RuntimeError
telys
A *_texts call (add_texts, search_text, …) runs with no embedder attached.
Attach an embedder on create_collection/open_collection.
KeyError
telys
add/add_texts receives an id that already exists (they insert new rows only). Message: ids already exist: [...] (first batch) or ids already exist (use upsert): [...] (after the base seals).
Use upsert/upsert_texts, or a fresh id.
ValueError
telys
A search vector length ≠ dim; an ingest batch fails the (n, dim) shape check; an embedder's dimension ≠ dim at create_collection; or update_texts targets ids that don't exist (update_texts: ids do not exist (use upsert_texts to insert): ...).
Match the collection dim; update only live ids — insert with upsert_texts instead.
AssertionError
telys.embedding
A CallableEmbedder fn returns the wrong shape (ndim != 2 or shape[1] != dimension).
Return an (N, dimension) float32 array from your fn.
VerificationError
telys.verify
A manifest signature, artifact hash, or license fails strict offline verification.
Re-install from a trusted source; check the issuer/audience/expiry.
RemoteError
telys.client
The server returns an error over the wire (bad request, auth failure, unknown collection).
Read the message; check the address, token, and collection name.
Ingest id conflicts
col.add_texts(["a"], ids=["dup"], metadata=[{"scope": "demo"}]) # first batch — seals the base
col.add_texts(["b"], ids=["dup"], metadata=[{"scope": "demo"}]) # KeyError: "ids already exist (use upsert): ['dup']"
col.upsert_texts(["b"], ids=["dup"], metadata=[{"scope": "demo"}]) # OK — replaces
col.update_texts(["c"], ids=["nope"], metadata=[{"scope": "demo"}]) # ValueError: update_texts: ids do not exist (use upsert_texts to insert): nopeupdate_texts is strict: every id must already be live — an unknown or deleted id raises instead of silently inserting a stray record. Mixed new+existing batches belong in upsert_texts.
Dimension and shape mismatches
A CallableEmbedder whose fn returns the wrong shape raises AssertionError, not ValueError:
Runtime-only imports
Verification failures
verify_license pins RS256, rejects crit, and checks issuer, audience, ver == 2, and expiry (with grace) before returning the products.telys tier and features.
Remote errors
CLI exit codes
Every telys command returns one of three codes.
0
Success / ready.
Any command that completes; bare telys (prints help); telys runtime status when the runtime is ready.
1
Error / not ready.
telys runtime status when the runtime is not installed; a fatal error during a command.
2
Usage error / unimplemented.
telys serve without --socket or without both --host and --port; telys runtime update (a stub that prints "not implemented yet").
See also
Last updated
Was this helpful?