fn serialised_jsonrpc_error(
    message: String,
    data: String,
    code: isize,
    id: Option<u32>,
) -> std::result::Result<String, String> {
    let jsonrpc_err = JsonRpcResponse {
        jsonrpc: SN_AUTHD_JSONRPC_VERSION.to_string(),
        result: None,
        error: Some(JsonRpcError {
            code,
            message,
            data,
        }),
        id,
    };
    let serialised_err_res = serde_json::to_string(&jsonrpc_err)
        .map_err(|err| format!("Failed to serialise authd error response: {:?}", err))?;

    Ok(serialised_err_res)
}
// Generates a serialised JSON-RPC error response
Generates a serialised JSON-RPC error response
Generates a serialised JSON - RPC error response
fn serialised_jsonrpc_error(
    message: String,
    data: String,
    code: isize,
    id: Option<u32>,
) -> std::result::Result<String, String> {
    let jsonrpc_err = JsonRpcResponse {
        jsonrpc: SN_AUTHD_JSONRPC_VERSION.to_string(),
        result: None,
        error: Some(JsonRpcError {
            code,
            message,
            data,
        }),
        id,
    };
    let serialised_err_res = serde_json::to_string(&jsonrpc_err)
        .map_err(|err| format!("Failed to serialise authd error response: {:?}", err))?;
    Ok(serialised_err_res)
}
fn serialised_jsonrpc_error ( message : String , data : String , code : isize , id : Option < u32 > , ) -> std :: result :: Result < String , String > { let jsonrpc_err = JsonRpcResponse { jsonrpc : SN_AUTHD_JSONRPC_VERSION . to_string ( ) , result : None , error : Some ( JsonRpcError { code , message , data , } ) , id , } ; let serialised_err_res = serde_json :: to_string ( & jsonrpc_err ) . map_err ( | err | format ! ( " " err ) ) ? ; Ok ( serialised_err_res ) }
Generates a serialised JSON-RPC error response
Generates a serialised JSON - RPC error response
message
String
data
String
code
isize
id
Option<u32>