Commit 1e6485cd authored by Josh Roesslein's avatar Josh Roesslein
Browse files

Handle 500 errors better.

parent 2d886f83
......@@ -85,6 +85,8 @@ def bind_api(path, parser, allowed_param=None, method='GET', require_auth=False,
resp = conn.getresponse()
# If an error was returned, throw an exception
if resp.status == 500:
raise TweepError('Twitter server error!')
if resp.status != 200:
raise TweepError(parse_error(resp.read()))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment