We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
src/comms/http.rs#L496
In the following lines of code, _r is not checked. Consequently, if the server responds with HTTP 400 or 500, the code will not detect it:
_r
HTTP 400
500
let _r = self.client .post(format!("{}/send", self.host_port)) .json(&frostd::SendArgs { ... }) .send().await?;
One possible solution could be to implement the following:
let resp = self.client.post(...).send().await?; if !resp.status().is_success() { return Err(eyre!("send failed: {}", resp.status()).into()); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Location
src/comms/http.rs#L496
Synopsis
In the following lines of code,
_r
is not checked. Consequently, if the server responds withHTTP 400
or500
, the code will not detect it:Mitigation
One possible solution could be to implement the following:
The text was updated successfully, but these errors were encountered: