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

added retry to api request #8

Closed
wants to merge 1 commit into from
Closed

added retry to api request #8

wants to merge 1 commit into from

Conversation

kainiklas
Copy link

Sometimes we need a retry.

@driesvints
Copy link
Collaborator

Thanks. I'll need a lot more info here though. Why did you need a retry? What did you do that didn't go as you expected and how did you trigger it?

@kainiklas
Copy link
Author

Occasioanally, I receive the following error:

(Illuminate\Http\Client\ConnectionException(code: 0): cURL error 35: OpenSSL SSL_connect: Connection was reset in connection to api.lemonsqueezy.com:443 (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://api.lemonsqueezy.com/v1/checkouts at \vendor\laravel\framework\src\Illuminate\Http\Client\PendingRequest.php:856)

Not sure if I am the only one with unreliable network, but I need a solution. I am open for other solutions as well. But for me, a retry is always a good idea when calling APIs.

Another idea: If we use the "old" way of creating the checkout URL, we don't need the call at all, makes my site way faster, and I also don't need a retry.

@driesvints
Copy link
Collaborator

Thanks. I've been in touch with Lemon Squeezy and they recommend sending in a support ticket as this seems to be an issue with their API. Right now, I'm a bit reluctant to add a retry mechanism in the library itself as there is no such thing as idempotency in the Lemon Squeezy API and thus we don't know what will happen if the same request is sent out twice.

I'm also sorry to say that I have no plans of re-introducing the old way of creating the checkout url as that's A) disregarded against from LS' side and B) not as flexible as using the API.

Hope you can solve this with LS 👍

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

Successfully merging this pull request may close these issues.

2 participants