tstachl/desk — pull request #18 by manvil (2014-01-22 01:52:48+00:00)
Title: Saving request payload for retry purpose

@tstachl

I have observed that when the API hits the rate limit for the current time slice the API throws Invalid JSON error.
Upon deeper investigation I found that the issue is because when retry is attempted after rate limit has been hit, the request which is sent has the response payload of the first API call. This probably causes issues with the Desk server and hence a BadRequest Error is raised. My change is pretty simple where we store the original request env and upon retry the saved env is used rather than the request modified env.

Regards,
Manvil