{"record":{"id":"45bc997c24021bae","repo":"gitbutlerapp/gitbutler","slug":"the-refreshed-reviews-were-missing-from-the-respon","errorCode":null,"errorMessage":"The refreshed reviews were missing from the response.","messagePattern":"The refreshed reviews were missing from the response\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/but-mcp-app/src/ReviewApp.tsx","lineNumber":349,"sourceCode":"\t\tconst reviewNumbers = view.reviews.filter(shouldPollReview).map((review) => review.number);\n\t\tif (reviewNumbers.length === 0) return;\n\n\t\tlet cancelled = false;\n\n\t\tasync function refreshReviews() {\n\t\t\ttry {\n\t\t\t\tconst result = await app?.callServerTool({\n\t\t\t\t\tname: \"gitbutler_refresh_reviews\",\n\t\t\t\t\targuments: {\n\t\t\t\t\t\trepository: view?.repository.path,\n\t\t\t\t\t\treviewNumbers,\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t\tif (cancelled || result === undefined) return;\n\t\t\t\tif (result.isError) throw new Error(textFromToolResult(result));\n\t\t\t\tconst refreshed = reviewViewFromToolResult(result);\n\t\t\t\tif (refreshed === null) {\n\t\t\t\t\tthrow new Error(\"The refreshed reviews were missing from the response.\");\n\t\t\t\t}\n\t\t\t\tsetView((current) => (current === null ? current : mergeReviewViews(current, refreshed)));\n\t\t\t} catch (pollCause) {\n\t\t\t\tif (cancelled) return;\n\t\t\t\tsetPollingError(\n\t\t\t\t\tpollCause instanceof Error ? pollCause.message : \"Could not refresh CI status.\",\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tconst timeout = window.setTimeout(() => void refreshReviews(), REVIEW_POLL_INTERVAL_MS);\n\t\treturn () => {\n\t\t\tcancelled = true;\n\t\t\twindow.clearTimeout(timeout);\n\t\t};\n\t}, [app, pollingError, view]);\n\n\tif (error !== null) {","sourceCodeStart":331,"sourceCodeEnd":367,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/58e5313667b857ef39a730e380af31816a7b1768/packages/but-mcp-app/src/ReviewApp.tsx#L331-L367","documentation":"The gitbutler_refresh_reviews tool call succeeded but its result payload could not be converted into a review view (reviewViewFromToolResult returned null) - the response was missing or had a malformed reviews field. This is a contract mismatch between the tool's response shape and the app's parser, not a failed refresh.","triggerScenarios":"Thrown at packages/but-mcp-app/src/ReviewApp.tsx:349 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check that the server tool's response schema includes the reviews field the parser expects","Update reviewViewFromToolResult to match the current tool result format","Treat an unparseable response as a skipped poll cycle and retry on the next tick instead of surfacing the error"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"58e5313667b857ef39a730e380af31816a7b1768","analyzedAt":"2026-09-18T06:50:32.052Z","contentChangedAt":"2026-09-18T06:50:32.052Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}