1
0
Fork 0
mirror of synced 2024-10-05 12:43:13 +13:00

Include response of 5xx status codes for function executions

This commit is contained in:
Karlis Suvi 2022-10-29 09:04:57 +00:00
parent 73bce1d7d0
commit 6ae1a12219

View file

@ -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'];