mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-05 03:00:15 -04:00
Modify /api/submit to return QUOTA_FILLED error when api_type=json.
This commit is contained in:
@@ -293,6 +293,7 @@ class ApiController(RedditController):
|
||||
|
||||
md = safemarkdown(msg)
|
||||
form.set_html(".status", md)
|
||||
form.send_failure(errors.QUOTA_FILLED)
|
||||
return
|
||||
|
||||
# well, nothing left to do but submit it
|
||||
|
||||
@@ -60,6 +60,7 @@ error_list = dict((
|
||||
('SUBREDDIT_REQUIRED', _('you must specify a subreddit')),
|
||||
('BAD_SR_NAME', _('that name isn\'t going to work')),
|
||||
('RATELIMIT', _('you are doing that too much. try again in %(time)s.')),
|
||||
('QUOTA_FILLED', _("You've submitted too many links recently. Please try again in an hour.")),
|
||||
('EXPIRED', _('your session has expired')),
|
||||
('DRACONIAN', _('you must accept the terms first')),
|
||||
('BANNED_IP', "IP banned"),
|
||||
|
||||
Reference in New Issue
Block a user