After a bit of digging, it turns out that if I disable the django-channels 
app that I'm using, I only get the one email with the exception that was 
thrown.
Even if I don't disable the django-channels app, and run it with daphne (as 
I would in production), rather than using the django channels ASGI 
development server, it works fine, and I only get one email when an 
exception is thrown.

On Friday, July 19, 2019 at 10:23:49 AM UTC-6, Tal wrote:
>
> I setup my django 2.2.3 project to use gmail to send emails out.
>
> I also have it configured to send me emails about any exceptions that 
> occur.
>
> To test it, I made a view with:
>
> float('a')
>
> It works, but I'm getting 2 emails in my Gmail inbox every time I hit that 
> view:
>
> [image: Screen Shot 2019-07-19 at 10.10.53 AM.png]
>
> The first email above seems to be related to the fact that after django 
> hit my float('a') line, an HTTP 500 exception was thrown. One of the lines 
> in it reads "Request data not supplied", if that helps.
>
> The second email above actually has the traceback from the float('a') 
> exception. It does have request data supplied (GET parameters, POST 
> parameters, COOKIES, FILES, etc).
>
> Is this normal? Is the email about the HTTP 500 exception ever useful? It 
> seems like it would always be accompanied by another email with more detail 
> about why the HTTP 500 error occurred, making it pretty useless. If so, is 
> there a way to disable it? Or am I doing something wrong?
>
> PS. I started a different topic about why the first email has characters 
> like [35;1m in it, which seems unrelated.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4d320bc1-38c8-4180-aa9f-4bf5689d83e6%40googlegroups.com.

Reply via email to