diff --git a/CHANGES.md b/CHANGES.md index 6ab752f34e..ff0ef8f145 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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) diff --git a/app/console b/app/console index 2456d8f21c..5e2a40c1e3 160000 --- a/app/console +++ b/app/console @@ -1 +1 @@ -Subproject commit 2456d8f21c6e2554056d1a37eab3602024cbb739 +Subproject commit 5e2a40c1e397bd341a432698c9d76a3f96315841 diff --git a/app/executor.php b/app/executor.php index 316794b929..0a0116047c 100644 --- a/app/executor.php +++ b/app/executor.php @@ -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'];