Skip to content

Commit e2e093f

Browse files
author
committed
Deployed 2a2b541 with MkDocs version: 1.6.1
1 parent 2aadd25 commit e2e093f

3 files changed

Lines changed: 424 additions & 36 deletions

File tree

errors/index.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@
892892

893893
<h1 id="errors-reference">Errors reference<a class="headerlink" href="#errors-reference" title="Permanent link">&para;</a></h1>
894894
<p><code>httpware</code> raises typed exceptions automatically — everything inherits <code>ClientError</code>, and HTTP responses with 4xx/5xx status raise status-keyed <code>StatusError</code> subclasses without you having to call <code>response.raise_for_status()</code>.</p>
895-
<p>For the resilience-specific errors (<code>RetryBudgetExhaustedError</code>, <code>BulkheadFullError</code>) see the <a href="../resilience/">Resilience reference</a>.</p>
895+
<p>For the resilience-specific errors (<code>RetryBudgetExhaustedError</code>, <code>BulkheadFullError</code>, <code>CircuitOpenError</code>) see the <a href="../resilience/">Resilience reference</a>.</p>
896896
<p>The status-keyed exception tree is shared between <code>Client</code> and <code>AsyncClient</code>. Catching <code>NotFoundError</code> in sync code uses the same import as catching it in async code (<code>from httpware import NotFoundError</code>).</p>
897897
<h2 id="the-exception-tree">The exception tree<a class="headerlink" href="#the-exception-tree" title="Permanent link">&para;</a></h2>
898898
<div class="highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a>ClientError (catch-all for anything httpware raises)
@@ -913,8 +913,9 @@ <h2 id="the-exception-tree">The exception tree<a class="headerlink" href="#the-e
913913
<a id="__codelineno-0-16" name="__codelineno-0-16" href="#__codelineno-0-16"></a>│ └── ServiceUnavailableError (503)
914914
<a id="__codelineno-0-17" name="__codelineno-0-17" href="#__codelineno-0-17"></a>├── RetryBudgetExhaustedError (a retry was needed but the budget refused)
915915
<a id="__codelineno-0-18" name="__codelineno-0-18" href="#__codelineno-0-18"></a>├── BulkheadFullError (acquire_timeout elapsed before a slot opened)
916-
<a id="__codelineno-0-19" name="__codelineno-0-19" href="#__codelineno-0-19"></a>├── DecodeError (response_model= decoder failed; HTTP call itself succeeded)
917-
<a id="__codelineno-0-20" name="__codelineno-0-20" href="#__codelineno-0-20"></a>└── MissingDecoderError (no registered decoder claims response_model=; fires before the HTTP call)
916+
<a id="__codelineno-0-19" name="__codelineno-0-19" href="#__codelineno-0-19"></a>├── CircuitOpenError (circuit is OPEN or HALF_OPEN probe slot taken; request not forwarded)
917+
<a id="__codelineno-0-20" name="__codelineno-0-20" href="#__codelineno-0-20"></a>├── DecodeError (response_model= decoder failed; HTTP call itself succeeded)
918+
<a id="__codelineno-0-21" name="__codelineno-0-21" href="#__codelineno-0-21"></a>└── MissingDecoderError (no registered decoder claims response_model=; fires before the HTTP call)
918919
</code></pre></div>
919920
<h2 id="status-to-exception-mapping">Status-to-exception mapping<a class="headerlink" href="#status-to-exception-mapping" title="Permanent link">&para;</a></h2>
920921
<table>
@@ -1030,6 +1031,8 @@ <h2 id="resilience-error-payloads">Resilience-error payloads<a class="headerlink
10301031
<p><code>BulkheadFullError</code> carries:
10311032
- <code>max_concurrent: int</code> — the configured cap
10321033
- <code>acquire_timeout: float | None</code> — the configured timeout</p>
1034+
<p><code>CircuitOpenError</code> carries:
1035+
- <code>retry_after: float | None</code> — seconds until the circuit will next admit a probe; <code>None</code> when a concurrent probe is already in flight (HALF_OPEN slot taken).</p>
10331036
<p>Use these for caller-side logging / alerting:</p>
10341037
<div class="highlight"><pre><span></span><code><a id="__codelineno-3-1" name="__codelineno-3-1" href="#__codelineno-3-1"></a><span class="k">except</span> <span class="n">RetryBudgetExhaustedError</span> <span class="k">as</span> <span class="n">exc</span><span class="p">:</span>
10351038
<a id="__codelineno-3-2" name="__codelineno-3-2" href="#__codelineno-3-2"></a> <span class="n">_LOGGER</span><span class="o">.</span><span class="n">error</span><span class="p">(</span>

0 commit comments

Comments
 (0)