Skip to content

Should warn properly if requestbody is not json #1

Description

@mokkabonna

Currently it just fails at ./lib/index.js:128 with SyntaxError: Unexpected token u in JSON at position 0

xhr.requestBody = JSON.parse(xhr.requestBody)

Should properly notify that the client sent header indicating JSON, but did not send proper json.

A normal api would return a 4xx error probably, but we should probably not assume that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions