diff options
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) |