Skip to content

Commit

Permalink
Enforce encoding of variables as object
Browse files Browse the repository at this point in the history
  • Loading branch information
hlubek committed Oct 5, 2021
1 parent 2591459 commit efc0a71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/PrunnerApiService.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function schedulePipeline(PipelineName $pipeline, array $variables): JobI
$response = $this->apiCall('POST', 'pipelines/schedule', json_encode([
'pipeline' => $pipeline->getName(),
'variables' => $variables
]));
], JSON_FORCE_OBJECT));
if ($response->getStatusCode() !== 202) {
throw new \RuntimeException('Scheduling a new pipeline run should have returned status code 202, but got: ' . $response->getStatusCode());
}
Expand Down

0 comments on commit efc0a71

Please sign in to comment.