Expose transport and malformed generation errors
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user