This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a commit to branch gh-pages
in repository https://gitbox.apache.org/repos/asf/iceberg-rust.git


The following commit(s) were added to refs/heads/gh-pages by this push:
     new 9b7fbef3 deploy: 947fbc1529c14dbd584b64e995400fc0cf7e80f2
9b7fbef3 is described below

commit 9b7fbef3fadf7c8d131bc41e0b3b155c983a3cd0
Author: liurenjie1024 <[email protected]>
AuthorDate: Sun Apr 27 09:37:15 2025 +0000

    deploy: 947fbc1529c14dbd584b64e995400fc0cf7e80f2
---
 api/help.html                               |  2 +-
 api/settings.html                           |  2 +-
 api/src/iceberg_catalog_rest/client.rs.html | 24 +++++++++++++++---------
 3 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/api/help.html b/api/help.html
index cc5a8c40..7a3da648 100644
--- a/api/help.html
+++ b/api/help.html
@@ -1 +1 @@
-<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta 
name="viewport" content="width=device-width, initial-scale=1.0"><meta 
name="generator" content="rustdoc"><meta name="description" 
content="Documentation for 
Rustdoc"><title>Help</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,Source
 [...]
\ No newline at end of file
+<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta 
name="viewport" content="width=device-width, initial-scale=1.0"><meta 
name="generator" content="rustdoc"><meta name="description" 
content="Documentation for 
Rustdoc"><title>Help</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,Source
 [...]
\ No newline at end of file
diff --git a/api/settings.html b/api/settings.html
index a636ef77..84ed2606 100644
--- a/api/settings.html
+++ b/api/settings.html
@@ -1 +1 @@
-<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta 
name="viewport" content="width=device-width, initial-scale=1.0"><meta 
name="generator" content="rustdoc"><meta name="description" content="Settings 
of 
Rustdoc"><title>Settings</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCo
 [...]
\ No newline at end of file
+<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta 
name="viewport" content="width=device-width, initial-scale=1.0"><meta 
name="generator" content="rustdoc"><meta name="description" content="Settings 
of 
Rustdoc"><title>Settings</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCo
 [...]
\ No newline at end of file
diff --git a/api/src/iceberg_catalog_rest/client.rs.html 
b/api/src/iceberg_catalog_rest/client.rs.html
index ee48ff0a..6e222f98 100644
--- a/api/src/iceberg_catalog_rest/client.rs.html
+++ b/api/src/iceberg_catalog_rest/client.rs.html
@@ -265,7 +265,10 @@
 <a href="#264" id="264">264</a>
 <a href="#265" id="265">265</a>
 <a href="#266" id="266">266</a>
-<a href="#267" id="267">267</a></pre></div><pre class="rust"><code><span 
class="comment">// Licensed to the Apache Software Foundation (ASF) under one
+<a href="#267" id="267">267</a>
+<a href="#268" id="268">268</a>
+<a href="#269" id="269">269</a>
+<a href="#270" id="270">270</a></pre></div><pre class="rust"><code><span 
class="comment">// Licensed to the Apache Software Foundation (ASF) under one
 // or more contributor license agreements.  See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.  The ASF licenses this file
@@ -517,19 +520,22 @@
 }
 
 <span class="doccomment">/// Deserializes a unexpected catalog response into 
an error.
-///
-/// TODO: Eventually, this function should return an error response that is 
custom to the error
-/// codes that all endpoints share (400, 404, etc.).
 </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span 
class="kw">async fn </span>deserialize_unexpected_catalog_error(response: 
Response) -&gt; Error {
-    <span class="kw">let </span>(status, headers) = (response.status(), 
response.headers().clone());
+    <span class="kw">let </span>err = Error::new(
+        ErrorKind::Unexpected,
+        <span class="string">"Received response with unexpected status 
code"</span>,
+    )
+    .with_context(<span class="string">"status"</span>, 
response.status().to_string())
+    .with_context(<span class="string">"headers"</span>, <span 
class="macro">format!</span>(<span class="string">"{:?}"</span>, 
response.headers()));
+
     <span class="kw">let </span>bytes = <span class="kw">match 
</span>response.bytes().<span class="kw">await </span>{
         <span class="prelude-val">Ok</span>(bytes) =&gt; bytes,
         <span class="prelude-val">Err</span>(err) =&gt; <span 
class="kw">return </span>err.into(),
     };
 
-    Error::new(ErrorKind::Unexpected, <span class="string">"Received 
unexpected response"</span>)
-        .with_context(<span class="string">"status"</span>, status.to_string())
-        .with_context(<span class="string">"headers"</span>, <span 
class="macro">format!</span>(<span class="string">"{:?}"</span>, headers))
-        .with_context(<span class="string">"json"</span>, 
String::from_utf8_lossy(<span class="kw-2">&amp;</span>bytes))
+    <span class="kw">if </span>bytes.is_empty() {
+        <span class="kw">return </span>err;
+    }
+    err.with_context(<span class="string">"json"</span>, 
String::from_utf8_lossy(<span class="kw-2">&amp;</span>bytes))
 }
 </code></pre></div></section></main></body></html>
\ No newline at end of file

Reply via email to