api /time returns empty array

sometimes the api /v3/time returns an empty array, with error code 0. I should get error 400, why 0 and an empty array?

2023.10.05 10:09:51 WARNING: method: GET
2023.10.05 10:09:51 WARNING: code: 0
2023.10.05 10:09:51 WARNING: --------
2023.10.05 10:09:51 WARNING: /api/v3/time
2023.10.05 10:09:51 WARNING: Array
(
)

400 is a HTTP error code, the code:0 is unrelated to it. You need to debug your local code and understand how your log is working.

https://api.binance.com/api/v3/time doesn’t have issues at all.

This is the piece of code, the log is printed when i receive a code that is neither 200 or 201. It seems i received 0 from the CURL call (maybe i received a ‘false’ response)?

$code = curl_getinfo( $ch, CURLINFO_HTTP_CODE );
                $errno = curl_errno( $ch );

                curl_close($ch);
                if(!in_array($code, [200, 201]) and isset($this->wk))
                {
                        $this->wk->log('w', 'method: ' . $method);
                        $this->wk->log('w', 'code: ' . $code);
                        $this->wk->log('w', '--------');
                        $this->wk->log('w', $api);
                        $this->wk->log('w', print_r($params,1));
                        $this->wk->log('w', $payload);
                        $this->wk->log('w', '--------');
                        $this->wk->log('w', print_r($data,1));
                        return false;

                }

it’s a CURL error:

Error received from CURL: 28

Related POST:

Received again error:

2023.10.09 13:40:09 WARNING: Error received from CURL: 28, retrying…
2023.10.09 13:40:09 WARNING: Error received from CURL: 28, retrying…
2023.10.09 13:40:09 WARNING: Error received from CURL: 28, retrying…
2023.10.09 13:40:09 WARNING: method: GET
2023.10.09 13:40:09 WARNING: code: 0
2023.10.09 13:40:09 WARNING: --------
2023.10.09 13:40:09 WARNING: /api/v3/time
2023.10.09 13:40:09 WARNING: Array
(
)