From 1e6485cd2f96f0505139f722603d7b6862ec6a45 Mon Sep 17 00:00:00 2001 From: Josh Roesslein Date: Tue, 18 Aug 2009 01:06:07 -0500 Subject: [PATCH] Handle 500 errors better. --- tweepy/binder.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tweepy/binder.py b/tweepy/binder.py index c91b68f..5b3fe62 100644 --- a/tweepy/binder.py +++ b/tweepy/binder.py @@ -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())) -- 2.25.1