1
0
Fork 0
mirror of synced 2024-06-30 12:10:51 +12:00

feat: update error message

This commit is contained in:
Christy Jacob 2022-03-15 16:04:43 +04:00
parent d17e252f93
commit 1728833307

View file

@ -458,10 +458,10 @@ App::post('/v1/execution')
switch (true) { switch (true) {
/** No Error. */ /** No Error. */
case $errNo === 0: break; case $errNo === 0: break;
/** Connection Refused. Runtime not ready for requests yet . 111 is the swoole error code for Connection Refused */ /** Runtime not ready for requests yet. 111 is the swoole error code for Connection Refused - see https://openswoole.com/docs/swoole-error-code */
case $errNo === 111: case $errNo === 111:
throw new Exception('An internal curl error has occurred within the executor! Error Msg: ' . $error, 406); throw new Exception('An internal curl error has occurred within the executor! Error Msg: ' . $error, 406);
/** Every other CURL error */ /** Any other CURL error */
default: default:
throw new Exception('An internal curl error has occurred within the executor! Error Msg: ' . $error, 500); throw new Exception('An internal curl error has occurred within the executor! Error Msg: ' . $error, 500);
} }