We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
BadRequestException
1 parent 8c84477 commit 2eb714dCopy full SHA for 2eb714d
src/platform/tests/Bridge/OpenAi/Gpt/ResultConverterTest.php
@@ -214,4 +214,16 @@ public function testThrowsBadRequestExceptionOnBadRequestResponse()
214
215
$converter->convert(new RawHttpResult($httpResponse));
216
}
217
+
218
+ public function testThrowsBadRequestExceptionOnBadRequestResponseWithNoResponseBody()
219
+ {
220
+ $converter = new ResultConverter();
221
+ $httpResponse = self::createMock(ResponseInterface::class);
222
+ $httpResponse->method('getStatusCode')->willReturn(400);
223
224
+ $this->expectException(BadRequestException::class);
225
+ $this->expectExceptionMessage('Bad Request');
226
227
+ $converter->convert(new RawHttpResult($httpResponse));
228
+ }
229
0 commit comments