mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 16:28:01 -05:00
Remove default RedditError code.
This conflicts with the wiki's notion that error objects without codes set aren't fatal.
This commit is contained in:
@@ -57,6 +57,9 @@ class MultiApiController(RedditController, OAuth2ResourceController):
|
||||
RedditController.pre(self)
|
||||
|
||||
def on_validation_error(self, error):
|
||||
if not error.code:
|
||||
return
|
||||
|
||||
abort(reddit_http_error(
|
||||
code=error.code,
|
||||
error_name=error.name,
|
||||
|
||||
@@ -146,7 +146,7 @@ def add_error_codes(new_codes):
|
||||
class RedditError(Exception):
|
||||
name = None
|
||||
fields = None
|
||||
code = 400
|
||||
code = None
|
||||
|
||||
def __init__(self, name=None, msg_params=None, fields=None, code=None):
|
||||
Exception.__init__(self)
|
||||
|
||||
Reference in New Issue
Block a user