Skip to content

HTTP-500 Error on Invalid JSON with Content-Type: application/json #73

Closed
@domwebber

Description

@domwebber

I'm unsure whether this is the intended behaviour, however, the following cURL will result in a 500 status code.

curl -X POST -H "Content-Type: application/json" -d 'not-json' http://localhost:8080

image

Looks to stem from:

if(req.is('application/json')){
echo.json = JSON.parse(req.body)
}

PR: #74

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