Comments (1)
Thank you for your kind words, really appreciate it! π
Normally, the token get's cached for the token lifetime (coming from Twitch) minus 60 seconds and if the cached token expired a new one is requested on the fly.
So generally speaking there should not be a case where the token for a request actually expires. The emphasis is on "should not" π .
I do not doubt you running into that issue. So there might exist such a case for whatever reason.
For the solution I could think of some sort of "retry mechanism". You've mentioned, you're catching the exception, deleting the cached token and wait for the next request. I would take it a step further and retry the current request for n
times (if it failed because the token expired) until it succeeds. If all n
requests fail, finally throw an exception.
But maybe you meant just that by "next request".
The n
should be globally configurable for each request via the package config file, but be overwritable per request as well. Just like the cache_lifetime
config + cache
method.
Taking these "ideas" into account I'll be happy to accept your pull request ππΌπ
from igdb-laravel.
Related Issues (20)
- Generate cover Array HOT 2
- Where do i place "Game::createWebhook"? HOT 3
- Add more info in the Readme on how to search with "Like" HOT 8
- Laravel HTTP request returned status code 401 "Authorization Failure" HOT 5
- Webhooks CLI not working HOT 6
- Platform Logos HOT 1
- How to access $event name in webhooks HOT 2
- IGDB webhooks not working suddenly HOT 9
- HTTP request returned status code 400: [ { "title": "Syntax Error", "status": 400 } ] HOT 1
- 401 Error with Token HOT 6
- title": "Syntax Error" HOT 5
- Only get official releases HOT 1
- Error when setting up relationships between IGDBLaravel\Models and regular Models HOT 6
- Multiple Models missing HOT 1
- Game cover give me an array instead an object HOT 4
- Call to a member function getUrl() on array HOT 2
- Feature Request: Add Event Endpoint HOT 7
- Weird issue after the update to 4.1.0 HOT 4
- Extracting a list of available platforms HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from igdb-laravel.