Merge branch 'master' into experimentalSplitHashAndVersionChecks

This commit is contained in:
Trevor Buckner authored and GitHub committed 2025-07-10 11:06:29 -04:00
commit b2c4bb7082
5 files changed
+22 -9

No files matched your search

+9 -4
View File
@@ -362,15 +362,20 @@ const api = {
let brew = _.assign(brewFromServer, brewFromClient);
brew.title = brew.title.trim();
brew.description = brew.description.trim() || '';
try {
const patches = parsePatch(brewFromClient.patches);
brew.text = applyPatches(patches, brewFromServer.text)[0];
// Patch to a throwaway variable while parallelizing - we're more concerned with error/no error.
const patchedResult = applyPatches(patches, brewFromServer.text)[0];
// brew.text = applyPatches(patches, brewFromServer.text)[0];
} catch (err) {
console.error('Failed to apply patches:', {
patches: brewFromClient.patches,
brewId: brew.editId || 'unknown'
patches : brewFromClient.patches,
brewId : brew.editId || 'unknown',
error : err
});
throw err; // rethrow to preserve the 500 behavior
// While running in parallel, don't throw the error upstream.
// throw err; // rethrow to preserve the 500 behavior
}
brew.text = api.mergeBrewText(brew);