MCPcopy Create free account
hub / github.com/chirpstack/chirpstack / err_to_response

Function err_to_response

chirpstack/src/api/backend/mod.rs:186–189  ·  view source on GitHub ↗
(e: anyhow::Error, bp: &backend::BasePayload)

Source from the content-addressed store, hash-verified

184}
185
186fn err_to_response(e: anyhow::Error, bp: &backend::BasePayload) -> backend::BasePayloadResult {
187 let msg = format!("{}", e);
188 bp.to_base_payload_result(err_to_result_code(e), &msg)
189}
190
191fn err_to_result_code(e: anyhow::Error) -> backend::ResultCode {
192 if let Some(e) = e.downcast_ref::<StorageError>() {

Callers 4

handle_pr_start_reqFunction · 0.85
handle_pr_stop_reqFunction · 0.85
handle_xmit_data_reqFunction · 0.85
handle_home_ns_reqFunction · 0.85

Calls 2

err_to_result_codeFunction · 0.85

Tested by

no test coverage detected