PrepGenAICerts
← Back to Labs

Error Propagation Context

context management✓Fill in Blank

Complete this structured error context object returned from a failed web search subagent. The coordinator needs enough information to make intelligent recovery decisions.

interface SubagentErrorContext {
  failureType: string;
  attemptedQuery: string;
  partialResults: SearchResult[];
  alternativeApproaches: string[];
}

function buildErrorContext(
  error: Error,
  query: string,
  resultsBeforeFailure: SearchResult[]
): SubagentErrorContext {
  return {
    // Classify the failure so the coordinator knows whether to retry
    failureType: "",

    attemptedQuery: query,

    // Include what was gathered before the failure occurred
    partialResults: ,

    // Suggest recovery strategies the coordinator can evaluate
    alternativeApproaches: [
      ,
    ],
  };
}

PrepGenAICerts is an independent exam-prep site. It is not affiliated with, endorsed by, or sponsored by Anthropic, PBC. Claude and Anthropic are trademarks of Anthropic, PBC. Exam details are taken from publicly available Anthropic and Pearson documentation. About PrepGenAICerts.