code
key is equal to 400
pm.test("status code is equal to invalid HTTP request", function () {
var jsonData = pm.response.json();
pm.expect(jsonData.status.code).to.eql(400);
});
The response JSON{
"status": {
"code": 400,
"text": "Mobile Number is required"
}
}