Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cURL errors #11

Open
Lebioda opened this issue Nov 22, 2020 · 3 comments
Open

cURL errors #11

Lebioda opened this issue Nov 22, 2020 · 3 comments

Comments

@Lebioda
Copy link

Lebioda commented Nov 22, 2020

Cześć,

bardzo często dostaję takie błędy:

  • Uncaught GuzzleHttp\Exception\ConnectException: cURL error 52: Empty reply from server
  • Uncaught GuzzleHttp\Exception\ConnectException: cURL error 28: Operation timed out after 150000 milliseconds with 0 out of 0 bytes received
  • Uncaught GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: allegro.pl

można to jakoś obsłużyć?

@ircykk
Copy link
Owner

ircykk commented Nov 22, 2020

Nie wygląda tona problem z libką tylko z połączeniem z serwerem allegro, przechwyć sobie wyjątek i ponów request jeśli wyrzuci wyjątek.

@Lebioda
Copy link
Author

Lebioda commented Nov 22, 2020

Nakierowałbyś mnie w którym miejscu w libce dodać obsługę? Chciałbym to w jednym miejscu zrobić, a za słaby jestem, aby dobrze ogarnąć sposób pisania kodu w tej libce i co się tu dzieje.

@ircykk
Copy link
Owner

ircykk commented Nov 24, 2020

Zwykłym blokiem try catch sobie obejmij zapytanie i przechwyć wyjątek, ewentualnie możesz zrobić sobie plugin zgodnie z tym: http://docs.php-http.org/en/latest/plugins/retry.html który będzie powtarzał zapytanie jeśli wystąpi jakiś dziwny błąd spowodowany problemem sieci.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants