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

Fails when trying to refresh access token #9

Open
Mexidense opened this issue Jan 22, 2021 · 1 comment
Open

Fails when trying to refresh access token #9

Mexidense opened this issue Jan 22, 2021 · 1 comment

Comments

@Mexidense
Copy link
Contributor

Hello @tristanjahier !

I hope everything is gone well!

I'm using this hash commit for versioning the package:
"tristanjahier/zoho-crm-php": "dev-v2-support#67f2e5fa310a29381f0581a04e8a84880ef24e59",

I've noticed on my app the following exception when it tries to refresh the token: ErrorException: Undefined index: expires_in

Trace:

ErrorException: Undefined index: expires_in
1
File "/var/www/html/vendor/tristanjahier/zoho-crm-php/src/V2/Client.php", line 319
2
File "/var/www/html/vendor/tristanjahier/zoho-crm-php/src/V2/Client.php", line 319 in Illuminate\Foundation\Bootstrap\HandleExceptions::handleError [args]
3
File "/var/www/html/app/Providers/ZohoServiceProvider.php", line 32 in Zoho\Crm\V2\Client::refreshAccessToken
+7 non-project frames
11
File "/var/www/html/app/Services/ZohoService.php", line 39 in app [args]
12
File "/var/www/html/app/Services/ZohoService.php", line 34 in App\Services\ZohoService::buildClient

Do you know what's happening?

Thank in advance 🙏🏽

@tristanjahier
Copy link
Owner

From what I have observed myself, it happens from time to time. It happened to one of my application a couple of times recently too (8th and 11th of February)...

I have no explanation for that unfortunately. It is probably Zoho's API failing because it happens very randomly.
And even if Zoho refuses to refresh your access token for valid reasons, the HTTP response status code should not be 200, and then Guzzle (which is the underlying HTTP client of this library) would throw an exception. And we would not have this issue anyway.

Can you confirm that it is not a recurring issue for you neither?

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