mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 16:28:01 -05:00
Do not override reddit_http_error explanation if provided.
This commit is contained in:
@@ -235,7 +235,7 @@ def reddit_http_error(code=400, error_name='UNKNOWN_ERROR', **data):
|
||||
exc = status_map[code]()
|
||||
|
||||
data['reason'] = exc.explanation = error_name
|
||||
if error_name in error_list:
|
||||
if 'explanation' not in data and error_name in error_list:
|
||||
data['explanation'] = exc.explanation = error_list[error_name]
|
||||
|
||||
# omit 'fields' json attribute if it is empty
|
||||
|
||||
Reference in New Issue
Block a user