Many imorovments
This commit is contained in:
@@ -57,7 +57,7 @@ pub async fn begin(
|
||||
.header(reqwest::header::USER_AGENT, user_agent)
|
||||
.send()
|
||||
.await
|
||||
.map_err(|e| RemoteError::Network(e.to_string()))?;
|
||||
.map_err(super::map_send_error)?;
|
||||
|
||||
if !resp.status().is_success() {
|
||||
return Err(RemoteError::Server {
|
||||
@@ -94,7 +94,7 @@ pub async fn poll(
|
||||
.body(format!("token={}", urlencode(&flow.poll.token)))
|
||||
.send()
|
||||
.await
|
||||
.map_err(|e| RemoteError::Network(e.to_string()))?;
|
||||
.map_err(super::map_send_error)?;
|
||||
|
||||
match resp.status().as_u16() {
|
||||
200 => {
|
||||
@@ -147,7 +147,7 @@ pub async fn revoke(
|
||||
.header("OCS-APIRequest", "true")
|
||||
.send()
|
||||
.await
|
||||
.map_err(|e| RemoteError::Network(e.to_string()))?;
|
||||
.map_err(super::map_send_error)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user