Skip to content

Commit

Permalink
Fix execution delays
Browse files Browse the repository at this point in the history
  • Loading branch information
Meldiron committed Jun 7, 2022
1 parent e8a9f3f commit cdc4423
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Executor/Executor.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,18 @@ public function createExecution(
);
$response = $this->call(self::METHOD_POST, $route, $headers, $params, true, $requestTimeout);
$status = $response['headers']['status-code'];

if($status < 400) {
return $response['body'];
}
break;
case $status === 406:
$response = $this->call(self::METHOD_POST, $route, $headers, $params, true, $requestTimeout);
$status = $response['headers']['status-code'];

if($status < 400) {
return $response['body'];
}
break;
default:
throw new \Exception($response['body']['message'], $status);
Expand Down

0 comments on commit cdc4423

Please sign in to comment.