Skip to main content

send_error

Function send_error 

Source
pub async fn send_error(
    client: &mut Framed<TcpStream, FrontendCodec>,
    sqlstate: &str,
    message: &str,
    status: TransactionStatus,
) -> Result<()>
Expand description

Send a non-fatal ErrorResponse frame followed by ReadyForQuery(status) so the client can continue the session after the error. Used for in-session rejections like read-write override attempts on a replica-routed transaction.

The status parameter must reflect the actual session state at the call site — same rule as super::synthetic::send_synthetic_ok.