Do not override reddit_http_error explanation if provided.

This commit is contained in:
Max Goodman
2013-03-09 00:45:07 -08:00
parent c3e804ff13
commit 0c42fa96c6

View File

@@ -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