mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
Merge pull request #4610 from ks129/fix-4594-function-response-500
Include response of 5xx status codes for function executions
This commit is contained in:
commit
5d1ada4652
3 changed files with 8 additions and 1 deletions
|
|
@ -1,3 +1,6 @@
|
|||
# Version TBD
|
||||
- Fix not storing function's response on response codes 5xx [#4610](https://github.com/appwrite/appwrite/pull/4610)
|
||||
|
||||
# Version 1.2.1
|
||||
## Changes
|
||||
- Upgrade Console to [2.2.0](https://github.com/appwrite/console/releases/tag/2.2.0)
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 2456d8f21c6e2554056d1a37eab3602024cbb739
|
||||
Subproject commit 5e2a40c1e397bd341a432698c9d76a3f96315841
|
||||
|
|
@ -548,6 +548,10 @@ App::post('/v1/execution')
|
|||
case $statusCode >= 500:
|
||||
$stderr = ($executorResponse ?? [])['stderr'] ?? 'Internal Runtime error.';
|
||||
$stdout = ($executorResponse ?? [])['stdout'] ?? 'Internal Runtime error.';
|
||||
$res = ($executorResponse ?? [])['response'] ?? '';
|
||||
if (is_array($res)) {
|
||||
$res = json_encode($res, JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
break;
|
||||
case $statusCode >= 100:
|
||||
$stdout = $executorResponse['stdout'];
|
||||
|
|
|
|||
Loading…
Reference in a new issue