Files
spacedrive/core/src/util/http.rs
Brendan Allan 4ede374a60 [ENG-1255] Feedback popover with new API (#1532)
* feedback popover with new api

* allow unauthed feedback

* add login information

* allow no auth

* fix hooks

* remove emoji on reset

* show cancel on left of login button
2023-10-13 08:08:07 +00:00

7 lines
211 B
Rust

use reqwest::Response;
pub fn ensure_response(resp: Response) -> Result<Response, rspc::Error> {
resp.error_for_status()
.map_err(|e| rspc::Error::new(rspc::ErrorCode::InternalServerError, e.to_string()))
}