raven-python icon indicating copy to clipboard operation
raven-python copied to clipboard

Django integration not logging 500 errors

Open lightninglu10 opened this issue 6 years ago • 5 comments

Hey guys, I don't know if I set up Raven wrong or what, but it's not logging 500 errors.

I've added

'raven.contrib.django.raven_compat',

to my INSTALLED_APPS

and then also added this as my config:

RAVEN_CONFIG = {
        'dsn': 'https://*****:*****@sentry.io/270462'
    }

lightninglu10 avatar Jan 12 '18 04:01 lightninglu10

@lightninglu10 what django version are you using?

ashwoods avatar Jan 12 '18 07:01 ashwoods

Django 2.0

lightninglu10 avatar Jan 12 '18 08:01 lightninglu10

So some more info: it logs some that I tried throwing, but other 500's that trigger the django 500 page it doesn't catch those.

lightninglu10 avatar Jan 12 '18 08:01 lightninglu10

Same problem with 1.11 here, solved it by inserting my own exception catching middleware which just calls out to raven and returns None so the exception bubbles up. This catches 404 and 403 exceptions though if not filtered. Is there anything other I can do?

dunkelstern avatar Jan 18 '18 11:01 dunkelstern

We've had a similiar issue after upgrade from 6.2.1 to 6.6.0 We found out that we were using raven.contrib.django.DjangoClient.get_user_info() method, which took user object as parameter in the previous versions, but it was changed to take request now. Gotcha.

bartoszgrabski avatar Apr 11 '18 15:04 bartoszgrabski