Skip to main content

error_envelope

Function error_envelope 

Source
pub fn error_envelope(
    id: RequestId,
    code: ErrorCode,
    message: impl Into<String>,
) -> JsonRpcResponse<Value>
Expand description

Build an error envelope by-hand. Useful for middleware that rejects before dispatch runs (rate limit, unknown role, etc.).