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

Function parse_error

plugins/src/lib.rs:1249–1258  ·  view source on GitHub ↗
(error: String)

Source from the content-addressed store, hash-verified

1247 pub data: Option<serde_json::Value>,
1248}
1249fn parse_error(error: String) -> RpcError {
1250 match serde_json::from_str::<RpcError>(&error) {
1251 Ok(o) => o,
1252 Err(_) => RpcError {
1253 code: Some(-32700),
1254 message: error,
1255 data: None,
1256 },
1257 }
1258}
1259
1260#[cfg(test)]
1261mod test {

Callers 1

handleMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected