From c3e804ff13cba3b5e5eaa0ef4699ac2c59346fdc Mon Sep 17 00:00:00 2001 From: Max Goodman Date: Sat, 9 Mar 2013 00:44:52 -0800 Subject: [PATCH] Default RedditError status code to 400. When threading validator errors through to reddit_http_error, it is useful to be able to assume that status code is a valid number in all cases. --- r2/r2/lib/errors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r2/r2/lib/errors.py b/r2/r2/lib/errors.py index b414ebaf3..dcac62062 100644 --- a/r2/r2/lib/errors.py +++ b/r2/r2/lib/errors.py @@ -141,7 +141,7 @@ def add_error_codes(new_codes): class RedditError(Exception): name = None fields = None - code = None + code = 400 def __init__(self, name=None, msg_params=None, fields=None, code=None): Exception.__init__(self)