Lists/members API operations are failing without an error message




My Lists/members operations have suddenly stopped working. They were working yesterday. I checked the API status report and it is only showing the “mainstream” operations. Have you noticed any problems with Twitter lists? I hope you can help with some suggestions.

I’m using a well-established API wrapper and all other features of my app are working fine (using the same wrapper)

On API Console, when I try this:
I’m getting a 200 OK response. Only if I go over count 4000, I get a 502 Bad gateway.

here’s an excerpt of my php code:

//defining the OAuth objects
require 'TwitterOAuth-2/vendor/autoload.php';
use TwitterOAuth\Auth\SingleUserAuth;
use TwitterOAuth\Serializer\ArraySerializer;

    //have we received something from the form input
    if(($_POST['targetlist']) != 0){
                $targetlist = $_POST['targetlist'];
                echo $targetlist; //getting an output here as expected
                //get the members of the ticked list
                $params = array(
                        'list_id' => $targetlist,
                        'count' => 500,
                        'include_entities' => 'false'

                $response2 = $auth->get('lists/members', $params);
                //this is where the script dies completely WITHOUT any error message
                $errcheck = $auth->getHeaders();
                $respcode = $errcheck['status'];
                echo "<br>response 2 get lists/members<br>";                                           
                    if ($respcode == " 200 OK"){
                        $countids = count($response2['users']);
                            for($j = 0; $j < $countids; $j++){
                                $nonfTwid[] = $response2['users'][$j]['id_str'];
                        //do the necessary array operations with $nonfTwid