Skip to content

[TRI-3840] Logging infinitely recursive javascript objects crashes, inside flattenAttributes. #1431

Closed
@matt-aitken

Description

@matt-aitken

Problem

If you try and log an object that has a circular reference, our flattenAttributes code will exceed the stack depth and fail.

Example: a user that has blog posts that have an author (that points back at the user).

This is a major issue with MongoDB which returns JS objects like this.

Solution

Detect circular objects and don't add them to the log output, put a placeholder string instead.

From SyncLinear.com | TRI-3840

Metadata

Metadata

Assignees

No one assigned

    Labels

    UrgentCreated by Linear-GitHub Sync

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions