gitbutlerapp/gitbutler · error
The refreshed reviews were missing from the response.
Error message
The refreshed reviews were missing from the response.
What it means
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.
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
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at packages/but-mcp-app/src/ReviewApp.tsx:349 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of gitbutlerapp/gitbutler@58e5313667 (2026-09-18).
Data as JSON: /api/errors/45bc997c24021bae.
Report an issue: GitHub.
Appendix: source
Thrown at packages/but-mcp-app/src/ReviewApp.tsx:349
const reviewNumbers = view.reviews.filter(shouldPollReview).map((review) => review.number);
if (reviewNumbers.length === 0) return;
let cancelled = false;
async function refreshReviews() {
try {
const result = await app?.callServerTool({
name: "gitbutler_refresh_reviews",
arguments: {
repository: view?.repository.path,
reviewNumbers,
},
});
if (cancelled || result === undefined) return;
if (result.isError) throw new Error(textFromToolResult(result));
const refreshed = reviewViewFromToolResult(result);
if (refreshed === null) {
throw new Error("The refreshed reviews were missing from the response.");
}
setView((current) => (current === null ? current : mergeReviewViews(current, refreshed)));
} catch (pollCause) {
if (cancelled) return;
setPollingError(
pollCause instanceof Error ? pollCause.message : "Could not refresh CI status.",
);
}
}
const timeout = window.setTimeout(() => void refreshReviews(), REVIEW_POLL_INTERVAL_MS);
return () => {
cancelled = true;
window.clearTimeout(timeout);
};
}, [app, pollingError, view]);
if (error !== null) {View on GitHub (pinned to 58e5313667)