mozilla / f1

INACTIVE - http://mzl.la/ghe-archive - F1 is a browser extension that allows you to share links in a fast and fun way. Share links from within the browser, from any webpage, using the same services you already know and love. F1 is made by Mozilla.

Home Page:http://f1.mozillamessaging.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.