mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
Fix execution delays
This commit is contained in:
parent
e8a9f3f9c4
commit
cdc44230cf
1 changed files with 8 additions and 0 deletions
|
|
@ -186,10 +186,18 @@ class Executor
|
||||||
);
|
);
|
||||||
$response = $this->call(self::METHOD_POST, $route, $headers, $params, true, $requestTimeout);
|
$response = $this->call(self::METHOD_POST, $route, $headers, $params, true, $requestTimeout);
|
||||||
$status = $response['headers']['status-code'];
|
$status = $response['headers']['status-code'];
|
||||||
|
|
||||||
|
if($status < 400) {
|
||||||
|
return $response['body'];
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case $status === 406:
|
case $status === 406:
|
||||||
$response = $this->call(self::METHOD_POST, $route, $headers, $params, true, $requestTimeout);
|
$response = $this->call(self::METHOD_POST, $route, $headers, $params, true, $requestTimeout);
|
||||||
$status = $response['headers']['status-code'];
|
$status = $response['headers']['status-code'];
|
||||||
|
|
||||||
|
if($status < 400) {
|
||||||
|
return $response['body'];
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new \Exception($response['body']['message'], $status);
|
throw new \Exception($response['body']['message'], $status);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue