Skip to content

How do we log contents of JSON responses? #468

@tansongyang

Description

@tansongyang

I tried turning on logContentsOfXhrCalls in our application. Request bodies get sent just fine, but response bodies are not.

The problem appears to be here. This guard checks if the responseType is empty string or 'text'. If so, the response text is included. Otherwise, we get the default text 'N/A for non text responses', which is what I'm seeing. And it's because I'm dealing with responseType === 'blob', specifically a JSON blob.

What is the guidance here?

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