Include response of 5xx status codes for function executions
This commit is contained in:
parent
73bce1d7d0
commit
6ae1a12219
1 changed files with 4 additions and 0 deletions
|
@ -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