error for bad status

This commit is contained in:
Quaternions 2024-04-10 03:45:11 -07:00
parent eac6546aed
commit a96715ecaf

View File

@ -259,8 +259,10 @@ async fn upload_list(cookie:String,group:Option<u64>,asset_id_file_map:AssetIDFi
Err(anyhow::Error::msg("Roblox returned 403 with no CSRF"))?;
}
}
Ok((asset_id,resp.bytes().await?))
match resp.status(){
reqwest::StatusCode::OK=>Ok((asset_id,resp.bytes().await?)),
other=>Err(anyhow::Error::msg(other)),
}
}
}))
.buffer_unordered(CONCURRENT_REQUESTS)