mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 00:49:02 +00:00
Merge pull request #11138 from appwrite/fix-general-unknown
This commit is contained in:
commit
6e292349b9
1 changed files with 6 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ use Appwrite\Event\Func;
|
|||
use Appwrite\Event\Realtime;
|
||||
use Appwrite\Event\StatsUsage;
|
||||
use Appwrite\Event\Webhook;
|
||||
use Appwrite\Extend\Exception as AppwriteException;
|
||||
use Appwrite\Utopia\Response\Model\Execution;
|
||||
use Exception;
|
||||
use Executor\Executor;
|
||||
|
|
@ -661,7 +662,11 @@ class Functions extends Action
|
|||
->trigger();
|
||||
|
||||
if (!empty($error)) {
|
||||
throw new Exception($error, $errorCode);
|
||||
throw new AppwriteException(
|
||||
AppwriteException::GENERAL_SERVER_ERROR,
|
||||
$error ?: 'Function execution failed with no error message',
|
||||
$errorCode
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue