MCPcopy Create free account
hub / github.com/Rust-Web-Development/code / transform_error

Function transform_error

ch_09/src/profanity.rs:65–72  ·  view source on GitHub ↗
(
    res: reqwest::Response,
)

Source from the content-addressed store, hash-verified

63}
64
65async fn transform_error(
66 res: reqwest::Response,
67) -> handle_errors::APILayerError {
68 handle_errors::APILayerError {
69 status: res.status().as_u16(),
70 message: res.json::<APIResponse>().await.unwrap().message,
71 }
72}

Callers 1

check_profanityFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected