diff options
author | Roald de Vries <rdevries@thoughtworks.com> | 2016-12-05 17:49:47 +0100 |
---|---|---|
committer | Roald de Vries <rdevries@thoughtworks.com> | 2016-12-05 17:49:47 +0100 |
commit | db611f3737442583ab2a07f75fbec74d827a2ff5 (patch) | |
tree | 012cb28a4345c66def2803e3f9cfcf0aee593d6b /service/pixelated/resources | |
parent | 3303510d3dabc4c1efdf39c52db026229d909490 (diff) | |
parent | 0dd71ff7c3a895e774205231c23720ee7313ad39 (diff) |
Merge branch 'master' into signup
Diffstat (limited to 'service/pixelated/resources')
-rw-r--r-- | service/pixelated/resources/login_resource.py | 4 | ||||
-rw-r--r-- | service/pixelated/resources/mails_resource.py | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/service/pixelated/resources/login_resource.py b/service/pixelated/resources/login_resource.py index 5838003a..9bb771df 100644 --- a/service/pixelated/resources/login_resource.py +++ b/service/pixelated/resources/login_resource.py @@ -133,10 +133,10 @@ class LoginResource(BaseResource): self._complete_bootstrap(user_auth, request) def render_error(error): - log.info('Login Error for %s' % request.args['username'][0]) + log.info('Login error for %s' % request.args['username'][0]) log.info('%s' % error) request.setResponseCode(UNAUTHORIZED) - return self._render_template(request, 'Invalid credentials') + return self._render_template(request, 'Invalid username or password') d = self._handle_login(request) d.addCallbacks(render_response, render_error) diff --git a/service/pixelated/resources/mails_resource.py b/service/pixelated/resources/mails_resource.py index 79b8ae4d..93070dd6 100644 --- a/service/pixelated/resources/mails_resource.py +++ b/service/pixelated/resources/mails_resource.py @@ -67,7 +67,7 @@ class MailsDeleteResource(Resource): def render_POST(self, request): def response_failed(failure): - log.error(failure, 'something failed') + log.error('something failed: %s' % failure.getErrorMessage()) request.finish() idents = json.loads(request.content.read())['idents'] @@ -175,7 +175,7 @@ class MailsResource(BaseResource): if isinstance(error.value, SMTPDownException): respond_json_deferred({'message': str(error.value)}, request, status_code=503) else: - log.error(error, 'error occurred while sending') + log.error('error occurred while sending: %s' % error.getErrorMessage()) respond_json_deferred({'message': 'an error occurred while sending'}, request, status_code=422) deferred = self._handle_post(request) @@ -185,7 +185,7 @@ class MailsResource(BaseResource): def render_PUT(self, request): def onError(error): - log.error(error, 'error saving draft') + log.error('error saving draft: %s' % error.getErrorMessage()) respond_json_deferred("", request, status_code=422) deferred = self._handle_put(request) |