Expose transport and malformed generation errors

This commit is contained in:
2026-09-23 16:37:47 +00:00
parent 056bfd0289
commit ea94d66fc2
8 changed files with 127 additions and 5 deletions

View File

@@ -558,6 +558,14 @@ disclosure policy. Promptkit does not assign retry or presentation behavior.
The [`GenerationError` GoDoc](../../generation_error.go) owns the exact typed
error contract.
Generation failures also match `ErrTransport` when the built-in HTTP request
fails, or `ErrMalformedResponse` when a successful provider response cannot be
decoded or an injected client returns a nil successful response. Both retain
`ErrLLMGenerate`; transport failures retain their original causes for
`errors.Is` and `errors.As`. Caller cancellation and deadlines retain their
standard context identities. Arbitrary injected-client errors retain their own
identities without Promptkit guessing a failure category from their text.
## Application Boundary
Promptkit is an importable library. It does not own a command, inbound HTTP

View File

@@ -216,6 +216,8 @@ admission slot. No asynchronous delivery or durable history.
## Stage 1 — Expose Missing Generation Failure Categories
**Completed:** 2026-09-23.
Read `errors.go`, `generation_error.go`, `llm_adapter.go`, the LLM error types,
and public error-boundary tests. Add public transport/malformed sentinels and
map current built-in errors while preserving cause identity and redacted text.