From 52c4ced7a2790de6375fc435dbfeb3073f20f763 Mon Sep 17 00:00:00 2001 From: Sandro Gehri Date: Tue, 12 Nov 2024 21:27:25 +0100 Subject: [PATCH] improve test to check newly introduced status code on error exception --- tests/Transporters/HttpTransporter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Transporters/HttpTransporter.php b/tests/Transporters/HttpTransporter.php index 15a45b8f..4fd772af 100644 --- a/tests/Transporters/HttpTransporter.php +++ b/tests/Transporters/HttpTransporter.php @@ -105,7 +105,8 @@ expect($e->getMessage())->toBe('Incorrect API key provided: foo. You can find your API key at https://platform.openai.com.') ->and($e->getErrorMessage())->toBe('Incorrect API key provided: foo. You can find your API key at https://platform.openai.com.') ->and($e->getErrorCode())->toBe('invalid_api_key') - ->and($e->getErrorType())->toBe('invalid_request_error'); + ->and($e->getErrorType())->toBe('invalid_request_error') + ->and($e->getStatusCode())->toBe(401); }); });