Skip to content

Commit 2726d31

Browse files
committed
fix: error response handling in Bedrock messages response transformation
1 parent 8017264 commit 2726d31

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/providers/bedrock/messages.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,9 +435,9 @@ export const BedrockMessagesResponseTransform = (
435435
_gatewayRequestUrl: string,
436436
gatewayRequest: Params
437437
): MessagesResponse | ErrorResponse => {
438-
if (responseStatus !== 200 && 'error' in response) {
438+
if (responseStatus !== 200) {
439439
return (
440-
BedrockErrorResponseTransform(response) ||
440+
BedrockErrorResponseTransform(response as BedrockErrorResponse) ||
441441
generateInvalidProviderResponseError(response, BEDROCK)
442442
);
443443
}

0 commit comments

Comments
 (0)