1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! Thin per-feature handler modules + the shared RFC-9457 `IntoResponse`
//! glue.
//!
//! Phase 14 replaces the Phase 4 scaffold `IntoResponse` for
//! [`ChatEngineError`] with the canonical pipeline:
//!
//! ```text
//! ChatEngineError → CanonicalError → Problem (RFC-9457)
//! ```
//!
//! The conversion travels through [`crate::api::rest::error`], so the
//! Phase 14 mapping table is the single source of truth. The
//! [`canonical_error_middleware`](toolkit::api::canonical_error_middleware)
//! installed by the gateway then enriches the resulting `Problem` with
//! `instance` + `trace_id` from the request scope.
//
// @cpt-cf-chat-engine-api-rest-handlers:p14
use ;
use ;
use crateChatEngineError;