pub fn error_response(
status: StatusCode,
id: Option<Value>,
code: i32,
message: impl Into<String>,
) -> ResponseExpand description
Convenience builder for a JSON-RPC error response paired with an HTTP status. SP-streamable-http §5.6 codifies the (status, code) pairs: origin → 403/-32001; missing bearer → 401/-32002; unknown method → 200/-32601; capability denied / broker error / internal → 200/-32603.