MCPcopy Index your code
hub / github.com/Rust-Web-Development/code / transform_error

Function transform_error

ch_11/src/profanity.rs:69–74  ·  view source on GitHub ↗
(res: reqwest::Response)

Source from the content-addressed store, hash-verified

67}
68
69async fn transform_error(res: reqwest::Response) -> handle_errors::APILayerError {
70 handle_errors::APILayerError {
71 status: res.status().as_u16(),
72 message: res.json::<APIResponse>().await.unwrap().message,
73 }
74}
75
76#[cfg(test)]
77mod profanity_tests {

Callers 1

check_profanityFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected