djangogoogle-app-engineemailapp-engine-patch

Does Google App Engine with app-engine-patch support emailing ADMINS upon 500 errors?


Django will email ADMINS upon 500 errors.

Reading app-engine-patch docs, it claims to enable mail support, but I can't tell if it does so enough to support 500 emailing.

I tried it and it doesn't seem to be working, but it is a silent failure with no log messages, so I might have misconfigured something.

Does anyone have experience with app-engine-patch emailing ADMINS upon 500?


Solution

  • Turns out I had misconfigured.

    BAD configuration:

    ADMINS = ['email1@example.com', 'email2@example.com']
    

    GOOD configuration:

    ADMINS = (('name1', 'email1@example.com'), \
              ('name2', 'email2@example.com'))
    

    See the docs about ADMINS.

    Also, be cautious about a tuple with a single entry, which due to Python requires a trailing comma:

    ADMINS = (('name1', 'email1@example.com'),)