diff --git a/r621/src/client.rs b/r621/src/client.rs index af45dfd..fc134f7 100644 --- a/r621/src/client.rs +++ b/r621/src/client.rs @@ -78,6 +78,7 @@ impl Client { ) -> Result> { self.request_limiter().await; let res = self.list_posts_raw(limit, tags, page).await?; + res.error_for_status_ref()?; Ok(res.json::().await?.into()) } @@ -101,6 +102,7 @@ impl Client { pub async fn get_post(&mut self, post_id: Id) -> Result { self.request_limiter().await; let res = self.get_post_raw(post_id).await?; + res.error_for_status_ref()?; Ok(res.json::().await?.into()) }