Yeniden Denenebilir Üst Veriler ve Kısmi Sonuçlar
errorCategory, isRetryable, attempted_query, partials.
Yeniden Denenebilir Üst Veriler ve Kısmi Sonuçlar, CoddyKit'te ücretsiz bir Claude Architect dersidir. Bu, 4 dersinin 3. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, Claude Architect öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. Claude Architect kursu toplamda 4 dersten oluşur.
Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.
Why Error Shape Matters
When a tool or MCP server fails, the model has to decide what to do next. A generic status like "Operation failed" gives it nothing to reason about, so the only safe move is to abort or guess.
A structured error turns a dead end into a decision: should we retry, route around the failure, or escalate to a human? In this lesson you'll learn the four metadata fields that make that possible: errorCategory, isRetryable, attempted_query, and partial_results.
The isError Flag
Every structured MCP error starts with one boolean: isError: true. This is the unambiguous signal that the tool result is a failure, not data.
Without it, the model may treat an error message as a legitimate answer and happily summarize the failure as if it were a result. The flag is the gate that activates all the recovery logic that follows.
tool_result = {
"isError": True,
"errorCategory": "transient",
"isRetryable": True,
"message": "Upstream timeout contacting orders DB",
"attempted_query": "SELECT * FROM orders WHERE id='A-2291'",
"partial_results": []
}errorCategory: Four Buckets
errorCategory classifies why the call failed so the model can route intelligently. The four standard categories are:
- transient — a temporary fault (timeout, rate limit). Likely worth retrying.
- validation — the input was malformed. Fix the request, don't blindly retry.
- business — a domain rule blocked it (e.g. order already shipped).
- permission — the caller isn't authorized. Retrying won't help; escalate or re-auth.
The category drives the strategy; it doesn't make the decision alone.
isRetryable: The Action Hint
isRetryable is the explicit yes/no on whether retrying could possibly succeed. It works with the category but encodes a sharper signal.
A transient timeout is usually isRetryable: true. A validation error is isRetryable: false — retrying the same bad input just fails again. Crucially, this lets the subagent recover transient faults locally instead of bubbling every hiccup up to the coordinator.
if result.get("isError"):
if result["isRetryable"] and attempt < max_attempts:
attempt += 1
continue # recover locally in the subagent
else:
escalate(result) # non-recoverable: pass it up with contextDon't Confuse Failure with Empty
A subtle but exam-critical distinction: an access FAILURE is not the same as a valid EMPTY result.
isError: true+transient→ the query couldn't run. Consider a retry.isError: false+ empty list → the query ran fine and there are genuinely no matches. Retrying is pointless and wasteful.
Generic errors blur this line. Structured metadata keeps "I couldn't look" cleanly separated from "I looked, nothing's there."
attempted_query: Make Retry Possible
attempted_query records exactly what the tool tried to do — the SQL, the API call, the search string. This serves two jobs:
- It lets the model retry with feedback: send the original intent plus the error so a corrected query can be formed.
- It feeds provenance — you keep a claim-to-source trail of what was actually asked.
Remember: retry-with-feedback fixes format/structural mistakes. If the information is simply absent from the source, no amount of re-querying helps.
{
"isError": True,
"errorCategory": "validation",
"isRetryable": True,
"message": "Unknown column 'order_no'; did you mean 'order_id'?",
"attempted_query": "SELECT * FROM orders WHERE order_no='A-2291'",
"partial_results": []
}partial_results: Don't Throw Away Good Data
When a multi-step or multi-source operation fails halfway, the work done before the failure is still valuable. partial_results carries it forward.
Imagine a research subagent that queried five sources and the fifth timed out. Returning the four successful results plus the error means the coordinator can keep going — instead of discarding everything because one leg failed. Never abort the whole workflow on a single failure.
{
"isError": True,
"errorCategory": "transient",
"isRetryable": True,
"message": "Source 5 (vendor API) timed out after 4 of 5 sources",
"attempted_query": "fetch pricing from [s1..s5]",
"partial_results": [
{"source": "s1", "price": 19.0},
{"source": "s2", "price": 21.5},
{"source": "s3", "price": 18.9},
{"source": "s4", "price": 20.0}
]
}Recover Locally, Escalate with Context
The metadata enables a clean two-tier strategy in hub-and-spoke systems:
- Recover transient faults locally inside the subagent — retry the
isRetryableones quietly. - Escalate non-recoverable failures up to the coordinator, carrying the full structured context: failure type, attempted query, and any partial results.
The coordinator handles errors and routes. But it can only route well if the subagent hands it a structured signal instead of a bare exception or silence.
Designing the Error Schema
If you define the error as structured output, apply the schema rules carefully. Mark a field required only if it is always present. partial_results is often empty or absent on a hard failure — so don't force it as required, or the model may fabricate entries to satisfy the schema.
For errorCategory, use an enum with an "other" value plus a free-text detail field. That keeps classification clean today and extensible for failure modes you haven't met yet.
error_schema = {
"type": "object",
"properties": {
"isError": {"type": "boolean"},
"errorCategory": {
"enum": ["transient", "validation",
"business", "permission", "other"]
},
"categoryDetail": {"type": "string"},
"isRetryable": {"type": "boolean"},
"attempted_query": {"type": "string"},
"partial_results": {"type": "array"}
},
"required": ["isError", "errorCategory", "isRetryable"]
}Hooks for the Failures That Cost Money
Metadata guides the model probabilistically (~90%). When a failure has financial, legal, or safety consequences, that isn't enough.
Use a PostToolUse hook to intercept the tool result before the model sees it, and enforce policy deterministically (100%). For example: if errorCategory is permission on a refund tool, block any retry and force escalation — don't leave it to the prompt to behave.
# PostToolUse hook: deterministic guard on structured errors
def post_tool_use(result):
if result.get("isError") and \
result["errorCategory"] == "permission":
return block_and_escalate(
reason=result["message"],
attempted=result["attempted_query"])
return resultAnti-Pattern: Silent Suppression
The worst thing you can do with a failure is hide it. Two failure modes to avoid:
- Silent suppression — swallowing the error and returning an empty or made-up result. Now the model can't tell a real "no matches" from a broken query.
- Aborting the whole workflow on one failed leg — throwing away every partial result.
Structured errors are the cure for both: they surface the failure and preserve what succeeded.
Quick Check: Routing a Partial Failure
Apply what you've learned to a real multi-agent scenario.
Recap: The Recovery Toolkit
Structured errors turn failures into routable decisions:
- isError — the gate that activates recovery logic.
- errorCategory — transient / validation / business / permission (+ "other") sets the strategy.
- isRetryable — the explicit retry hint; recover transient faults locally.
- attempted_query — enables retry-with-feedback and provenance (won't help if info is truly absent).
- partial_results — carry forward good data; never abort the whole workflow on one failure.
Mark only always-present fields as required, guard money/legal/safety failures with deterministic hooks, and never suppress errors silently. That's architect-grade error handling.
Sıkça Sorulan Sorular
“Yeniden Denenebilir Üst Veriler ve Kısmi Sonuçlar” dersi ücretsiz mi?
Evet — “Yeniden Denenebilir Üst Veriler ve Kısmi Sonuçlar” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve Claude Architect kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. Claude Architect kursu toplamda 4 dersten oluşur.
“Yeniden Denenebilir Üst Veriler ve Kısmi Sonuçlar” dersinde ne öğreneceğim?
errorCategory, isRetryable, attempted_query, partials. Claude Architect ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.
Claude Architect öğrenmeye başlamak için deneyim gerekli mi?
Önceden deneyim gerekmez. CoddyKit'te Claude Architect, başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 3. dersidir.
“Yeniden Denenebilir Üst Veriler ve Kısmi Sonuçlar” dersi ne kadar sürer?
Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.
Bu Claude Architect dersinde kod yazıp çalıştırabilir miyim?
Evet. Her Claude Architect dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.
Bu kursun tüm dersleri
- isError Bayrağı
- Hata Kategorileri
- Yeniden Denenebilir Üst Veriler ve Kısmi Sonuçlar
- Karşıt Örüntü: Genel Hata Mesajları