mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-02-16 01:17:31 -05:00
Raise exception with details for RedditErrors missing status codes.
This commit is contained in:
@@ -83,6 +83,9 @@ class MultiApiController(RedditController, OAuth2ResourceController):
|
||||
RedditController.pre(self)
|
||||
|
||||
def on_validation_error(self, error):
|
||||
if not error.code:
|
||||
raise ValueError('Error %r missing status code' % error)
|
||||
|
||||
abort(reddit_http_error(
|
||||
code=error.code,
|
||||
error_name=error.name,
|
||||
|
||||
Reference in New Issue
Block a user