Error Handling / Degradation
Define bounded recovery and honest partial results for each failure.
These examples and illustrative results are independently authored teaching materials, not measured model results.
Use case
A repository report requires target metadata while issue context is optional. Teaching metadata identifies repo-a’s revision; issue lookup may time out or fail authentication. Preserve useful work within recovery scope without claiming missing content was obtained.
Mechanism
Classify required/optional inputs and error types. Missing target metadata blocks identity-dependent conclusions. Retry an optional issue timeout once under the teaching contract, then deliver metadata with the gap. Authentication needs proper access rather than wider accounts/repeated calls. Record obtained, missing and recovery outcomes separately.
Bad example
Retry every failure indefinitely until reporting complete. Use a wider account after authentication failure and infer missing issue details from its title.
Good example
For this report, missing metadata leaves target revision unconfirmed and blocks its conclusions. Retry optional issue timeout once; continued failure yields metadata plus issue-unavailable status. Report authentication gaps without bypassing scope or inventing content. List input states and partial boundaries instead of calling degradation complete.
Why the change matters
Missing revision undermines report identity, while optional context can permit a bounded partial result. Classified limited recovery avoids repetitive calls and keeps unevidenced conclusions visible.
Observable expectation
Teaching cases: missing metadata→unconfirmed target; valid metadata with two issue timeouts→partial metadata report; authentication failure→unmet access.
Verify bounded retries, no fabricated content and no expanded authorization. One successful input does not establish complete coverage.
Limits
One retry is a teaching contract, subject to actual service limits/recovery. Write retries also need idempotency/deduplication. This example reads only and calls no real service; provenance remains unconfirmed.
Sources and evidence
Source text has not been located. This method meets the editorial criteria; its examples are independent teaching constructions.
Read the editorial criteria