Mercurial > kallithea
changeset 1175:8c0a57a4b89b beta
Journal Should not return 500 errors on failure, rather better is to return bad request error
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 27 Mar 2011 00:23:44 +0100 |
parents | 228622715ee9 |
children | b3f48216e55e |
files | rhodecode/controllers/journal.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/controllers/journal.py Wed Mar 23 20:58:12 2011 +0100 +++ b/rhodecode/controllers/journal.py Sun Mar 27 00:23:44 2011 +0100 @@ -31,7 +31,7 @@ from webhelpers.paginate import Page from itertools import groupby -from paste.httpexceptions import HTTPInternalServerError +from paste.httpexceptions import HTTPBadRequest from pylons import request, tmpl_context as c, response, url from pylons.i18n.translation import _ from webhelpers.feedgenerator import Atom1Feed, Rss201rev2Feed @@ -132,7 +132,7 @@ self.rhodecode_user.user_id) return 'ok' except: - raise HTTPInternalServerError() + raise HTTPBadRequest() repo_id = request.POST.get('follows_repo_id') if repo_id: @@ -141,11 +141,11 @@ self.rhodecode_user.user_id) return 'ok' except: - raise HTTPInternalServerError() + raise HTTPBadRequest() log.debug('token mismatch %s vs %s', cur_token, token) - raise HTTPInternalServerError() + raise HTTPBadRequest()