From 0766e6b99fc088897a54d5d6cc79ca0543075e1d Mon Sep 17 00:00:00 2001 From: Nuwan Date: Thu, 19 Feb 2026 21:01:25 +0530 Subject: [PATCH] fix(24-01): parse JSON response in recording REST functions The startRecording, stopRecording, and getRecordingPromise functions were returning the raw Response object instead of the parsed JSON data. This caused recording.id to be undefined, leading to the C++ client crash with "Assertion failed: (!clientId.isEmpty())". - Add .json() parsing before resolving the Promise - Fixes crash when clicking Start Recording Co-Authored-By: Claude Opus 4.5 --- jam-ui/src/helpers/rest.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/jam-ui/src/helpers/rest.js b/jam-ui/src/helpers/rest.js index e3f4b28a1..fbf0c6744 100644 --- a/jam-ui/src/helpers/rest.js +++ b/jam-ui/src/helpers/rest.js @@ -755,7 +755,8 @@ export const startRecording = (options) => { method: 'POST', body: JSON.stringify(options) }) - .then(response => resolve(response)) + .then(response => response.json()) + .then(data => resolve(data)) .catch(error => reject(error)); }); }; @@ -767,7 +768,8 @@ export const stopRecording = (options) => { method: 'POST', body: JSON.stringify(rest) }) - .then(response => resolve(response)) + .then(response => response.json()) + .then(data => resolve(data)) .catch(error => reject(error)); }); }; @@ -776,7 +778,8 @@ export const getRecordingPromise = (options) => { const { id } = options; return new Promise((resolve, reject) => { apiFetch(`/recordings/${id}`) - .then(response => resolve(response)) + .then(response => response.json()) + .then(data => resolve(data)) .catch(error => reject(error)); }); };