Skip to content

Engine throws error when serializing trace data for file uploads #1667

@nmchaves

Description

@nmchaves

Using Apollo Server 2 file uploads with Apollo Engine will cause the server to throw an error and return a 500 response to the client. Furthermore, this event will not be logged to Apollo Engine.

More specifically, the following line will throw an error when it tries to stringify a file upload promise (using Apollo Server 2's file upload feature):
https://github.com/apollographql/apollo-server/blob/master/packages/apollo-engine-reporting/src/extension.ts#L141

The exception is:

TypeError: Converting circular structure to JSON

This probably means that the file upload promise contains a circular reference. JSON doesn't currently support circular references (see MDN docs)

This issue will be resolved by #1668

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions