mailjet / mailjet-apiv3-php

[API v3] Mailjet PHP Wrapper
http://dev.mailjet.com
MIT License
263 stars 86 forks source link

API TIME OUT #266

Closed DiegoInostroza closed 1 year ago

DiegoInostroza commented 1 year ago

Hi, I have been having problems with the mailjet API, and it is that situations occur where the image error occurs

  [GuzzleHttp\Exception\ConnectException]                                                                                                     
  cURL error 28: Operation timed out after 15001 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) 

But, if I run it again everything works great. This is the request that I make to the API

        $filters = array(
            'FromTS' => $from,
            'ToTS' => $to,
            'ShowCustomID' => true,
            'ShowContactAlt' => true,
            'Limit' => $limit,
            'Offset' => $offset,
            'Sort' => 'createdAt ASC'
        );
        $response = $this->mailjetClient->get(Resources::$Message, ['filters' => $filters]);

        if($response->success()) return $response->getData();

Has the same happened to anyone? how did they manage to solve it?

oleksandr-mykhailenko commented 1 year ago

Hello @DiegoInostroza Does it happen each time when you try to make a request ?

oleksandr-mykhailenko commented 1 year ago

Hello @DiegoInostroza I see that field createdAt is not supported for sorting

image

I tested your example, and for API worked well. Do you have this each time or only with specific params ?

oleksandr-mykhailenko commented 1 year ago

I close the issue due to inactivity