mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
feat: propogate errors in Executor
This commit is contained in:
@@ -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'];
|
||||
|
||||
Reference in New Issue
Block a user