Skip to content

Handle error #29

@gforcada

Description

@gforcada

In our production server we see the following traceback, by thousands:

2025-05-07 00:20:16,070 ERROR   [sentry_sdk.errors:223][waitress-0] Internal error in sentry_sdk
Traceback (most recent call last):
  File "/srv/s-derfreitag/.batou-shared-eggs/sentry_sdk-2.24.1-py3.11.egg/sentry_sdk/client.py", line 603, in _prepare_event
    new_event = before_send(event, hint or {})
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/s-derfreitag/.batou-shared-eggs/collective.sentry-0.3.2-py3.11.egg/collective/sentry/error_handler.py", line 180, in before_send
    return _before_send(event, hint)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/s-derfreitag/.batou-shared-eggs/collective.sentry-0.3.2-py3.11.egg/collective/sentry/error_handler.py", line 150, in _before_send
    if _ignore_error(event):
       ^^^^^^^^^^^^^^^^^^^^
  File "/srv/s-derfreitag/.batou-shared-eggs/collective.sentry-0.3.2-py3.11.egg/collective/sentry/error_handler.py", line 54, in _ignore_error
    if error_log and exc_info[0].__name__ in error_log._ignored_exceptions:
                     ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute '__name__'

Bumping sentry_sdk from 2.24.1 to 2.27.0 seems to be working for us, should we enforce that in setup.py ? 🤔

Looking at this exc_info[0].__name__ that is None: exc_info is the result of sys.exc_info() which on its description says:

If no exception is being handled anywhere on the stack, this function return a tuple containing three None values.

So, could it be that sentry_sdk is processing something that is not actually an exception?

Looking at the sentry-sdk changelog I don't spot anything that might fix the problem though 🤷🏾

Anyone else noticed this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions