Harvest API does not reset the protected variable $refreshingToken...
Issue #2
resolved
...and you can't reset it because it is protected and there is no method. That variable changes the url that requests are sent to, therefore when you refresh a token, you have to re-instantiate the object in order to reset that variable.
I hard coded a fix re-instantiating the $client object in the Harvest::client() method after the refresh call in the live HAI project. Not sure if that is the best solution.
Comments (4)
-
-
ahhhh that's probably the mysterious error that vanishes after a second try of calling the API. you're a genius.
-
A fix was sent to the original package: https://github.com/cogitools/hapi/pull/7
He usually accepts PRs quickly, but I also moved the HAI lockfile to use the patched version.
-
- changed status to resolved
- Log in to comment
yet another weird bug on the Harvest unnofficial libraries? what a novelty.