Skip to content

Async task tracebacks should be properly handled in case of error #3105

@sentry

Description

@sentry

EncodeError: Object of type 'traceback' is not JSON serializable
Sentry Issue: STUDIO-EA2

DatabaseError: Save with update_fields did not affect any rows.
(5 additional frame(s) were not displayed)
...
  File "contentcuration/models.py", line 1763, in save
    super(ContentNode, self).save(*args, **kwargs)
  File "mptt/models.py", line 1009, in save
    super(MPTTModel, self).save(*args, **kwargs)
  File "django/db/models/base.py", line 808, in save
    force_update=force_update, update_fields=update_fields)
  File "django/db/models/base.py", line 838, in save_base
    updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
  File "django/db/models/base.py", line 909, in _save_table
    raise DatabaseError("Save with update_fields did not affect any rows.")

TypeError: Object of type 'traceback' is not JSON serializable
(3 additional frame(s) were not displayed)
...
  File "__init__.py", line 238, in dumps
    **kw).encode(obj)
  File "json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "kombu/utils/json.py", line 59, in default
    return super(JSONEncoder, self).default(o)
  File "json/encoder.py", line 180, in default
    o.__class__.__name__)

EncodeError: Object of type 'traceback' is not JSON serializable
(16 additional frame(s) were not displayed)
...
  File "__init__.py", line 238, in dumps
    **kw).encode(obj)
  File "json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "kombu/utils/json.py", line 59, in default
    return super(JSONEncoder, self).default(o)
  File "json/encoder.py", line 180, in default
    o.__class__.__name__)

Task move_nodes_task[16d16ea4640948dba75408d0c7ecc28e] raised unexpected: EncodeError(TypeError("Object of type 'traceback' is not JSON serializable",),)

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