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 <noreply@anthropic.com>
This commit is contained in:
parent
fcf68b6926
commit
0766e6b99f
|
|
@ -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));
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue