We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9b63cd6 + 7ea2554 commit 9b029aaCopy full SHA for 9b029aa
.changeset/calm-guests-pump.md
@@ -0,0 +1,5 @@
1
+---
2
+'@firebase/ai': patch
3
4
+
5
+Fixed an issue where `AIError` messages were too long after including an entire response body.
packages/ai/src/requests/response-helpers.ts
@@ -298,9 +298,9 @@ export async function handlePredictResponse<
298
} else {
299
throw new AIError(
300
AIErrorCode.RESPONSE_ERROR,
301
- `Predictions array in response has missing properties. Response: ${JSON.stringify(
302
- responseJson
303
- )}`
+ `Unexpected element in 'predictions' array in response: '${JSON.stringify(
+ prediction
+ )}'`
304
);
305
}
306
0 commit comments