Files
yii2/framework/web/JsonParser.php
Carsten Brandt 5a069d1a3c Fixed inappropriate error response on invalid JSON request
Current API responds to invalid JSON with:

```json
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=UTF-8
...

{"name":"Bad Request","message":"Invalid JSON data in request body: Syntax error.","code":0,"status":400,"previous":{"name":"Internal Server Error","message":"There was an error at the server.","code":0,"status":500}}
```

While it should be

```json
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=UTF-8
...

{"name":"Bad Request","message":"Invalid JSON data in request body: Syntax error.","code":0,"status":400}
```
2015-09-02 23:10:38 +02:00

1.6 KiB