getsentry / raven-python

Raven is the legacy Python client for Sentry (getsentry.com) — replaced by sentry-python
https://sentry.io
BSD 3-Clause "New" or "Revised" License
1.68k stars 657 forks source link

Allow `extra` to be None in breadcrumbs processing #1309

Open joker-at-work opened 5 years ago

joker-at-work commented 5 years ago

Sometimes, extra is passed in as a default parameter of another function and can therefore be None. This fixes:

Traceback (most recent call last):
  File "raven/breadcrumbs.py", line 77, in get_buffer
    processor(payload)
  File "raven/breadcrumbs.py", line 143, in processor
    data_value.update(extra)
TypeError: 'NoneType' object is not iterable
david-volantio commented 4 years ago

The issue addressed by this PR is preventing my team from upgrading to 6.10.0. The issue in my particular project arises when calling captureMessage (that I know of - I haven't exhaustively testing every call in my project) without extra, so I'm not sure where extra is being defaulted to None but it would seem to be between captureMessage and breadcrumb processing.

ashwoods commented 4 years ago

@david-volantio if you are able to upgrade, any reason for not being able to give the new sdk a go? https://github.com/getsentry/sentry-python

david-volantio commented 4 years ago

@ashwoods a fair point - I was just hoping we could move to the latest release but updating to sentry-python is definitely on our roadmap. thanks!