Skip to content

Commit 9b029aa

Browse files
authored
Merge 7ea2554 into 9b63cd6
2 parents 9b63cd6 + 7ea2554 commit 9b029aa

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.changeset/calm-guests-pump.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,9 @@ export async function handlePredictResponse<
298298
} else {
299299
throw new AIError(
300300
AIErrorCode.RESPONSE_ERROR,
301-
`Predictions array in response has missing properties. Response: ${JSON.stringify(
302-
responseJson
303-
)}`
301+
`Unexpected element in 'predictions' array in response: '${JSON.stringify(
302+
prediction
303+
)}'`
304304
);
305305
}
306306
}

0 commit comments

Comments
 (0)