You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<li><code>model: type</code> — the <code>response_model=</code> value that wasn't claimed.</li>
1067
1067
<li><code>registered_names: tuple[str, ...]</code> — class names of the registered decoders that all rejected the model. Empty tuple means no decoders were registered.</li>
1068
1068
</ul>
1069
-
<p>Corrective action depends on the message hint:</p>
1069
+
<p>The message reads <code>no decoder for response_model=<Model>: <hint></code>, and the corrective action depends on the hint. The two hints, verbatim:</p>
1070
1070
<ul>
1071
-
<li><code>no decoders registered. Install pip install httpware[pydantic] or pip install httpware[msgspec], or pass decoders=[...] explicitly.</code> — install an extra or pass an explicit decoder list.</li>
1072
-
<li><code>registered decoders (PydanticDecoder + MsgspecDecoder) all rejected it.</code> — your <code>response_model</code> type is exotic enough that neither built-in claims it. Pass a custom <code>ResponseDecoder</code> via <code>decoders=[...]</code>.</li>
1071
+
<li>
1072
+
<p><strong>No decoders were registered</strong> — install an extra or pass an explicit decoder list:</p>
1073
+
<divclass="highlight"><pre><span></span><code>no decoders registered. Install `pip install httpware[pydantic]` or `pip install httpware[msgspec]`, or pass decoders=[...] explicitly.
1074
+
</code></pre></div>
1075
+
</li>
1076
+
<li>
1077
+
<p><strong>Registered decoders all rejected the model</strong> — your <code>response_model</code> type is exotic enough that neither built-in claims it; pass a custom <code>ResponseDecoder</code> via <code>decoders=[...]</code>:</p>
1078
+
<divclass="highlight"><pre><span></span><code>registered decoders (PydanticDecoder + MsgspecDecoder) all rejected it. Pass a custom decoder via decoders=[...].
1079
+
</code></pre></div>
1080
+
</li>
1073
1081
</ul>
1074
1082
<p>Unlike <code>DecodeError</code>, this error fires <em>before</em> the HTTP request — no traffic is sent.</p>
the first decoder whose <code>can_decode(model)</code> returns <code>True</code>. Both built-in
977
977
decoders claim broadly within their library; the ordering encodes your
978
978
preference for shared shapes (<code>dict</code>, <code>list[Foo]</code>, dataclasses, primitives):</p>
979
-
<divclass="highlight"><pre><span></span><code><aid="__codelineno-5-1" name="__codelineno-5-1" href="#__codelineno-5-1"></a><spanclass="c1"># pydantic-first (the default when both extras are installed):</span>
<aid="__codelineno-5-7" name="__codelineno-5-7" href="#__codelineno-5-7"></a><spanclass="c1"># msgspec-first — same native routing, but shared shapes go to msgspec:</span>
<aid="__codelineno-5-5" name="__codelineno-5-5" href="#__codelineno-5-5"></a><spanclass="c1"># pydantic-first (the default when both extras are installed):</span>
<aid="__codelineno-5-11" name="__codelineno-5-11" href="#__codelineno-5-11"></a><spanclass="c1"># msgspec-first — same native routing, but shared shapes go to msgspec:</span>
0 commit comments