1
0
Fork 0
mirror of synced 2024-06-29 19:50:26 +12:00

chore: errors.php

This commit is contained in:
loks0n 2024-05-20 11:05:53 +01:00
parent 095baab24a
commit 4d572d4a05
2 changed files with 6 additions and 2 deletions

View file

@ -519,6 +519,11 @@ return [
'description' => 'Entrypoint for your Appwrite Function is missing. Please specify it when making deployment or update the entrypoint under your function\'s "Settings" > "Configuration" > "Entrypoint".',
'code' => 404,
],
Exception::FUNCTION_SYNCHRONOUS_TIMEOUT => [
'name' => Exception::FUNCTION_SYNCHRONOUS_TIMEOUT,
'description' => 'Synchronous function execution timed out. Please check the function code and try again.',
'code' => 408,
],
/** Builds */
Exception::BUILD_NOT_FOUND => [

View file

@ -3,7 +3,6 @@
namespace Executor;
use Appwrite\Extend\Exception as AppwriteException;
use Appwrite\Utopia\Response;
use Exception;
use Utopia\System\System;
@ -333,7 +332,7 @@ class Executor
if ($curlError) {
if ($curlError == CURLE_OPERATION_TIMEDOUT) {
throw new AppwriteException(AppwriteException::FUNCTION_SYNCHRONOUS_TIMEOUT, $curlErrorMessage, Response::STATUS_CODE_REQUEST_TIMEOUT);
throw new AppwriteException(AppwriteException::FUNCTION_SYNCHRONOUS_TIMEOUT);
}
throw new Exception($curlErrorMessage . ' with status code ' . $responseStatus, $responseStatus);
}