MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / unwrapPromptResult

Function unwrapPromptResult

common/src/util/error.ts:183–188  ·  view source on GitHub ↗
(result: PromptResult<T>)

Source from the content-addressed store, hash-verified

181 * @throws {AbortError} When result.aborted is true.
182 */
183export function unwrapPromptResult<T>(result: PromptResult<T>): T {
184 if (result.aborted) {
185 throw new AbortError(result.reason)
186 }
187 return result.value
188}
189
190/**
191 * Parses a JSON response body string from an API error to extract structured error details.

Callers 9

promptFlashWithFallbacksFunction · 0.90
callerWithUnwrapFunction · 0.90
middleOperationFunction · 0.90
relabelTraceWithModelFunction · 0.90
relabelWithRelaceFunction · 0.90

Calls

no outgoing calls

Tested by 2

callerWithUnwrapFunction · 0.72
middleOperationFunction · 0.72