MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / check_error

Function check_error

nodedb-client/src/native/connection/mod.rs:430–439  ·  view source on GitHub ↗
(resp: NativeResponse)

Source from the content-addressed store, hash-verified

428}
429
430fn check_error(resp: NativeResponse) -> NodeDbResult<()> {
431 if resp.status == ResponseStatus::Error {
432 let msg = resp
433 .error
434 .map(|e| e.message)
435 .unwrap_or_else(|| "unknown error".into());
436 return Err(NodeDbError::internal(msg));
437 }
438 Ok(())
439}
440
441fn response_to_query_result(resp: NativeResponse) -> NodeDbResult<QueryResult> {
442 if resp.status == ResponseStatus::Error {

Callers 4

beginMethod · 0.85
commitMethod · 0.85
rollbackMethod · 0.85
set_parameterMethod · 0.85

Calls 1

internalFunction · 0.50

Tested by

no test coverage detected