feat: propogate errors in Executor

This commit is contained in:
Christy Jacob committed 2022-02-16 15:43:21 +04:00
1 parent b6758c1262
commit cef5264c48
3 files changed
+22 -21

No files matched your search

+3 -3
View File
@@ -58,7 +58,7 @@ class Executor
$status = $response['headers']['status-code'];
if ($status >= 400) {
throw new \Exception($response['body'], $status);
throw new \Exception($response['body']['message'], $status);
}
return $response['body'];
@@ -80,7 +80,7 @@ class Executor
$status = $response['headers']['status-code'];
if ($status >= 400) {
throw new \Exception('Error deleting deployment: ' . $deploymentId , $status);
throw new \Exception($response['body']['message'], $status);
}
return $response['body'];
@@ -120,7 +120,7 @@ class Executor
$status = $response['headers']['status-code'];
if ($status >= 400) {
throw new \Exception('Error creating execution: ', $status);
throw new \Exception($response['body']['message'], $status);
}
return $response['body'];