(resp: NativeResponse)
| 428 | } |
| 429 | |
| 430 | fn 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 | |
| 441 | fn response_to_query_result(resp: NativeResponse) -> NodeDbResult<QueryResult> { |
| 442 | if resp.status == ResponseStatus::Error { |
no test coverage detected