Skip to content

Commit 7ea2554

Browse files
committed
stringify unexpected element in error message
1 parent d285f99 commit 7ea2554

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/ai/src/requests/response-helpers.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,9 @@ export async function handlePredictResponse<
299299
} else {
300300
throw new AIError(
301301
AIErrorCode.RESPONSE_ERROR,
302-
`Unexpected element in 'predictions' array in response: '${prediction}'`
302+
`Unexpected element in 'predictions' array in response: '${JSON.stringify(
303+
prediction
304+
)}'`
303305
);
304306
}
305307
}

0 commit comments

Comments
 (0)