Set `err.statusCode` to `res.statusCode`
Add frontends API