diff options
author | Victor Shyba <victor.shyba@gmail.com> | 2015-08-30 02:35:06 -0300 |
---|---|---|
committer | Victor Shyba <victor.shyba@gmail.com> | 2015-08-30 02:36:13 -0300 |
commit | de67baa0c84621ed9d08e716720845910c078778 (patch) | |
tree | 3acdaa52d67a14caa4f6a7a62eb43f43a63668aa /service/pixelated | |
parent | 3280dcca9d85b69f7344b2a509274565039e2c7a (diff) |
[bug] Do not send failure to user, send a msg
Failure was being returned when user expect just a status message.
-- Issue #369
Diffstat (limited to 'service/pixelated')
-rw-r--r-- | service/pixelated/resources/mails_resource.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/service/pixelated/resources/mails_resource.py b/service/pixelated/resources/mails_resource.py index ce05ff3a..75c0e14f 100644 --- a/service/pixelated/resources/mails_resource.py +++ b/service/pixelated/resources/mails_resource.py @@ -147,7 +147,8 @@ class MailsResource(Resource): if isinstance(error.value, SMTPDownException): respond_json_deferred({'message': str(error.value)}, request, status_code=503) else: - respond_json_deferred({'message': str(error)}, request, status_code=422) + err(error, 'something failed') + respond_json_deferred({'message': 'an error occurred while sending'}, request, status_code=422) deferred.addCallback(onSuccess) deferred.addErrback(onError) |