Closed japafrite closed 10 months ago
Thanks for the heads-up. v1.1.2 throws a RuntimeException when the session can't be established. You'll be able to catch that exception in your code.
@japafrite The createSession endpoint has the following limits:
So if you're exceeding this you'll get rate limited (generally for 24 hours) and would instead need to refresh an existing session using com.atproto.server.refreshSession
What I'm doing is saving the refresh token ($data->refreshJwt) to a file. Then each time I connect I check for the file and use the token to refresh any open session. You can see it in my fork.
Very good point, @colin-walker. While this library now throws an exception when you hit your rate limit, it doesn't do help prevent you from hitting that rate limit. I'm currently working on v2.0.0 which takes advantage of com.atproto.server.refreshSession
(though in a different way than your fork does).
@cjrasmussen I look forward to seeing how you do it.
Hey, On creating session I have an error exception on line 26 in case of rate limit 🙃, data returned does not have did property. Properties are : +"error": "RateLimitExceeded" +"message": "Rate Limit Exceeded" How can we manage this ?