Sentry not picking up all 500 errors?

I have been using Sentry now for a while and it’s great. It picks up most errors, but somehow not all of them.

I have a Slack bot running with the Django framework (hosted with Heroku) and errors that happen with the Slack bot are not tracked. When my bot picks something up from a team in Slack, it sends a post request to a specific URL on my server. The server then processes that request and then sends something back if needed. Somehow Sentry does not catch any 500 errors there. According to the logs from Heroku, errors happen there.

Any idea how to fix this?

I am using Raven 6.0.0 on python 2.7

I’m having the same issue - did you figure out how to fix this?

Unfortunately, I have not been able to fix this yet. I think Sentry depends on requests and since celery is not making them, it doesn’t catch the errors. I am currently using both the Django error handling system and sentry to catch errors. It’s not great, but so far it works for me.

Perhaps you could try out the new Python SDK instead of Raven? It is more intrusive in hooking into frameworks but also simpler to debug in why certain errors do not get sent. Make sure to enable the Celery and Django integration.

I use the new version of Sentry. The problem seems to be specific to Slack?

Here’s my function:

def Slack_Webhook(request):
  data = json.loads(request.body)
  raise Exception()

When I curl the endpoint the exception gets logged, when I hit it through Slack making a POST request as a webhook, it doesn’t (I know it still hits it because it shows up as a 500 in my server logs). How is this possible?

BTW, Rollbar picks it up either way :confused: I love Sentry but it seems like I’m going to have to switch if it randomly doesn’t catch errors based on who’s sending the request somehow?

Could you post a bug report against the SDK then? I believe this thread is about multiple unrelated issues now as you two are using different sdks.

Where do I do that?

Assuming we’re indeed talking about the sentry_sdk package in your case, please file an issue here: