|
@@ -221,7 +221,13 @@ async function runSecondaryModel(
|
|
|
const session = sessionResponse.data;
|
|
const session = sessionResponse.data;
|
|
|
const sessionId = session?.id;
|
|
const sessionId = session?.id;
|
|
|
if (!sessionId) {
|
|
if (!sessionId) {
|
|
|
- throw new Error('Secondary model session did not return an id');
|
|
|
|
|
|
|
+ const errorDetail =
|
|
|
|
|
+ sessionResponse && 'error' in sessionResponse
|
|
|
|
|
+ ? `: ${JSON.stringify(sessionResponse.error)}`
|
|
|
|
|
+ : '';
|
|
|
|
|
+ throw new Error(
|
|
|
|
|
+ `Secondary model session did not return an id${errorDetail}`,
|
|
|
|
|
+ );
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const sourceChars = content.length;
|
|
const sourceChars = content.length;
|