Skip to content

Commit

Permalink
MultiApiController: fix on_validation_error() to set code
Browse files Browse the repository at this point in the history
Some errors don't have a code associated with them so we need to
supply a default value to abort_with_error. This fixes the
USER_DOESNT_EXIST errors that are causing exceptions.
  • Loading branch information
bsimpson63 committed Dec 14, 2016
1 parent db3bb27 commit a402192
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion r2/r2/controllers/multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@


class MultiApiController(RedditController):
on_validation_error = staticmethod(abort_with_error)
def on_validation_error(self, error):
abort_with_error(error, error.code or 400)

def pre(self):
set_extension(request.environ, "json")
Expand Down

0 comments on commit a402192

Please sign in to comment.