CLI-1273: Cryptic errors for 500 responses #734
mt.yml
on: pull_request
Mutation Testing Code Review Annotations
18s
Annotations
1 error and 3 warnings
Mutation Testing Code Review Annotations
Process completed with exit code 1.
|
Mutation Testing Code Review Annotations
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Mutation Testing Code Review Annotations:
src/Connector/Client.php#L157
Escaped Mutant for Mutator "Concat":
--- Original
+++ New
@@ @@
{
// Internal server errors return HTML instead of JSON, breaking our parsing.
if ($response->getStatusCode() === 500) {
- throw new RuntimeException('Cloud API internal server error. Status ' . $response->getStatusCode() . '. Request ID ' . $response->getHeaderLine('X-Request-Id'));
+ throw new RuntimeException('Cloud API internal server error. Status ' . $response->getStatusCode() . $response->getHeaderLine('X-Request-Id') . '. Request ID ');
}
$body_json = $response->getBody();
$body = json_decode($body_json, null, 512, JSON_THROW_ON_ERROR);
|
Mutation Testing Code Review Annotations:
src/Connector/Client.php#L157
Escaped Mutant for Mutator "ConcatOperandRemoval":
--- Original
+++ New
@@ @@
{
// Internal server errors return HTML instead of JSON, breaking our parsing.
if ($response->getStatusCode() === 500) {
- throw new RuntimeException('Cloud API internal server error. Status ' . $response->getStatusCode() . '. Request ID ' . $response->getHeaderLine('X-Request-Id'));
+ throw new RuntimeException('Cloud API internal server error. Status ' . $response->getStatusCode() . '. Request ID ');
}
$body_json = $response->getBody();
$body = json_decode($body_json, null, 512, JSON_THROW_ON_ERROR);
|