diff --git a/common/Multiprogramming.php b/common/Multiprogramming.php index 056c0aa..9bae597 100644 --- a/common/Multiprogramming.php +++ b/common/Multiprogramming.php @@ -151,10 +151,10 @@ abstract class Multiprogramming implements Progaram return new Result(code: 505, message: $client->getBody()); } $body = json_decode($client->getBody(), true); - if (!is_null($body)) { + if (is_null($body) || (isset($body['errcode']) && $body['errcode'] != 0)) { return new Result(code: $body['errcode'], message: $body['errmsg']); } else { - return new Result(code: 0, data: $client->getBody()); + return new Result(code: 0, data: $body); } }