Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
oser-backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hamza Touizrat
oser-backend
Commits
02a3a6eb
Commit
02a3a6eb
authored
May 26, 2018
by
florimondmanca
Browse files
Options
Downloads
Patches
Plain Diff
another error logging fix
parent
9015d7a5
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
oser_backend/mails/signals.py
+5
-1
5 additions, 1 deletion
oser_backend/mails/signals.py
with
5 additions
and
1 deletion
oser_backend/mails/signals.py
+
5
−
1
View file @
02a3a6eb
"""
Mails app signals.
"""
from
django.dispatch
import
Signal
,
receiver
from
python_http_client
import
HTTPError
from
logs
import
get_logger
...
...
@@ -28,4 +29,7 @@ def log_app_disabled(sender, subject, recipient_list, **kwargs):
@receiver
(
failed
)
def
log_failed
(
sender
,
exception
,
**
kwargs
):
"""
Log an exception that occurred during a mail delivery.
"""
if
isinstance
(
exception
,
HTTPError
):
logger
.
exception
(
exception
.
body
)
else
:
logger
.
exception
(
exception
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment