{"record":{"id":"66b2385a37991b6c","repo":"larksuite/cli","slug":"bridged-dryrun-returned-t-expected-common-dryru","errorCode":null,"errorMessage":"bridged DryRun returned %T, expected *common.DryRunAPI","messagePattern":"bridged DryRun returned %T, expected \\*common\\.DryRunAPI","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"shortcuts/common/typed_external.go","lineNumber":90,"sourceCode":"\treturn newArgs(), nil\n}\n\nfunc adaptBridgeHooks(hooks commandbridge.Hooks) compiledHooks {\n\tadapted := compiledHooks{\n\t\tnewArgs:   hooks.NewArgs,\n\t\tnormalize: hooks.Normalize,\n\t\tvalidate:  hooks.Validate,\n\t\trenderers: hooks.Renderers,\n\t}\n\tif hooks.DryRun != nil {\n\t\tadapted.dryRun = func(ctx context.Context, runtime typedRuntimeContext, args any) (*DryRunAPI, error) {\n\t\t\tvalue, err := hooks.DryRun(ctx, runtime, args)\n\t\t\tif err != nil || value == nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tpreview, ok := value.(*DryRunAPI)\n\t\t\tif !ok {\n\t\t\t\treturn nil, fmt.Errorf(\"bridged DryRun returned %T, expected *common.DryRunAPI\", value)\n\t\t\t}\n\t\t\treturn preview, nil\n\t\t}\n\t}\n\tif hooks.Execute != nil {\n\t\tadapted.execute = func(ctx context.Context, runtime typedRuntimeContext, args any) (compiledResult, error) {\n\t\t\tresult, err := hooks.Execute(ctx, runtime, args)\n\t\t\tconverted := compiledResult{data: result.Data, outcome: typedOutcomeKind(result.Outcome)}\n\t\t\tif result.Pagination != nil {\n\t\t\t\tconverted.meta = &typedResultMeta{Pagination: &typedResultPaginationMeta{\n\t\t\t\t\tComplete: result.Pagination.Complete,\n\t\t\t\t\tPages:    result.Pagination.Pages, Items: result.Pagination.Items,\n\t\t\t\t\tNextToken: result.Pagination.NextToken,\n\t\t\t\t}}\n\t\t\t}\n\t\t\treturn converted, err\n\t\t}\n\t}","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/larksuite/cli/blob/7fd6ef3c07182257ce776cdc5a614e122d5bd4b3/shortcuts/common/typed_external.go#L72-L108","documentation":"Guard in the command-bridge DryRun adapter: a host plugin's bridged DryRun hook returned a value whose type is not *common.DryRunAPI. Bridge implementers must return that concrete preview type.","triggerScenarios":"Thrown at shortcuts/common/typed_external.go:90 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Return *common.DryRunAPI (or nil) from the bridged DryRun hook"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7fd6ef3c07182257ce776cdc5a614e122d5bd4b3","analyzedAt":"2026-09-04T21:17:44.649Z","contentChangedAt":"2026-09-04T21:17:44.649Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}