MCPcopy Create free account
hub / github.com/ElementsProject/lightning / custom_error_with_data

Method custom_error_with_data

plugins/lsps-plugin/src/proto/jsonrpc.rs:370–380  ·  view source on GitHub ↗

Reserved for implementation-defined server-errors.

(
        code: i64,
        message: T,
        data: serde_json::Value,
    )

Source from the content-addressed store, hash-verified

368
369 /// Reserved for implementation-defined server-errors.
370 pub fn custom_error_with_data<T: core::fmt::Display>(
371 code: i64,
372 message: T,
373 data: serde_json::Value,
374 ) -> Self {
375 RpcError {
376 code,
377 message: message.to_string(),
378 data: Some(data),
379 }
380 }
381}
382
383pub trait RpcErrorExt {

Callers

nothing calls this directly

Calls 1

to_stringMethod · 0.45

Tested by

no test coverage detected