Hitting bitly rate limiter
mhammond opened this issue · comments
The logs are showing:
[Tue Mar 08 19:40:59 2011] [error] Traceback (most recent call last): [Tue Mar 08 19:40:59 2011] [error] File "/home/linkdrop/linkdrop-staging/linkdrop/lib/helpers.py", line 128, in json_exception_response [Tue Mar 08 19:40:59 2011] [error] return func(*args, **kwargs) [Tue Mar 08 19:40:59 2011] [error] File "/home/linkdrop/linkdrop-staging/linkdrop/controllers/send.py", line 168, in send [Tue Mar 08 19:40:59 2011] [error] shorturl = shorten_link(longurl) [Tue Mar 08 19:40:59 2011] [error] File "/home/linkdrop/linkdrop-staging/linkdrop/lib/shortener.py", line 35, in shorten_link [Tue Mar 08 19:40:59 2011] [error] return bitly_data["url"] [Tue Mar 08 19:40:59 2011] [error] TypeError: list indices must be integers, not str
A little bit of hacking was able to reproduce it locally - the response from bitly is:
{ "data": [ ], "status_code": 403, "status_txt": "RATE_LIMIT_EXCEEDED" }
I've checked in a logging change so the bitly response is logged when this happens, but that obviously doesn't help resolve it.
I'll look into this, we have a contact at bit.ly and they also have instructions for getting additional access.
http://bit.ly/pages/help#i_6_4
We got our API rate cap increased for now and with the better logging (i'm getting this from shane :)) we should be able to track down any errors that might be on our part.