Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/calm-guests-pump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@firebase/ai': patch
---

Fixed an issue where `AIError` messages were too long after including an entire response body.
6 changes: 3 additions & 3 deletions packages/ai/src/requests/response-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,9 @@ export async function handlePredictResponse<
} else {
throw new AIError(
AIErrorCode.RESPONSE_ERROR,
`Predictions array in response has missing properties. Response: ${JSON.stringify(
responseJson
)}`
`Unexpected element in 'predictions' array in response: '${JSON.stringify(
prediction
)}'`
);
}
}
Expand Down
Loading