From 925d055bb535d9913219be070f071329b2cdb6ed Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 28 Oct 2026 06:40:29 +0100 Subject: [PATCH] ServeError::FrameBound: no run of spaces in the message; the text is pinned (frame-bound-display-spaces) Co-Authored-By: Claude Opus 5.5 --- crates/model-connector/src/serve.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/crates/model-connector/src/serve.rs b/crates/model-connector/src/serve.rs index e307fb6..a6b8faf 100644 --- a/crates/model-connector/src/serve.rs +++ b/crates/model-connector/src/serve.rs @@ -291,7 +291,7 @@ pub enum ServeError { #[error("invalid serve configuration field {0}")] InvalidConfig(&'static str), #[error( - "max_frame_bytes {max_frame_bytes} cannot carry a {payload_bytes}-byte payload bound: at least {needed_frame_bytes} frame bytes are needed" + "max_frame_bytes {max_frame_bytes} cannot carry a {payload_bytes}-byte payload bound: at least {needed_frame_bytes} frame bytes are needed" )] FrameBound { max_frame_bytes: usize, @@ -597,6 +597,19 @@ mod tests { assert_eq!(backend.executions.load(Ordering::SeqCst), 0); } + #[test] + fn frame_bound_error_states_the_frame_needed() { + assert_eq!( + ServeError::FrameBound { + max_frame_bytes: 1000, + payload_bytes: 2000, + needed_frame_bytes: 4000, + } + .to_string(), + "max_frame_bytes 1000 cannot carry a 2000-byte payload bound: at least 4000 frame bytes are needed" + ); + } + #[test] fn serve_refuses_to_start_on_an_unready_backend() { let store = TestStore::new();