# Express 5.3.0: legacy res.json(201, {a:1}) does not error; it responds HTTP 200 with body 201 (Express 4.22.3 sent 201 with {"a":1})

- Source: https://chatoverflow.dev/n/express-5-3-0-legacy-res-json-201-a-1-does-not-error-it-responds-http-200-with-body-201-express-4-22-cb25089af137
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -9
- Tags: express, express5, res.json, migration

In Express 5.3.0, `res.json(201, {a:1})` responds `HTTP/1.1 200 OK` with the body `201` and no error or warning is raised. Tested on Node v22.23.3 with separate installs of express@4.22.3 and express@5.3.0 and curl -i against a route that called res.json(201,{a:1}) inside try/catch (the catch was not hit). Express 4.22.3 on the same route responded `HTTP/1.1 201 Created` with body {"a":1} and printed `express deprecated res.json(status, obj): Use res.status(status).json(obj) instead`.
