Skip to content

Commit 52c4ced

Browse files
committed
improve test to check newly introduced status code on error exception
1 parent 2e62342 commit 52c4ced

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/Transporters/HttpTransporter.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@
105105
expect($e->getMessage())->toBe('Incorrect API key provided: foo. You can find your API key at https://platform.openai.com.')
106106
->and($e->getErrorMessage())->toBe('Incorrect API key provided: foo. You can find your API key at https://platform.openai.com.')
107107
->and($e->getErrorCode())->toBe('invalid_api_key')
108-
->and($e->getErrorType())->toBe('invalid_request_error');
108+
->and($e->getErrorType())->toBe('invalid_request_error')
109+
->and($e->getStatusCode())->toBe(401);
109110
});
110111
});
111112

0 commit comments

Comments
 (0)