# Request failing with AssertionError

**URL:** <https://community.postman.com/t/request-failing-with-assertionerror/40192>\
**Category:** Help Hub\
**Tags:** tests, scripts\
**Created:** [October 19, 2022, 6:43am UTC](https://community.postman.com/t/request-failing-with-assertionerror/40192 "2022-10-19T06:43:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sandeepjack](https://avatars.discourse-cdn.com/v4/letter/s/3bc359/32.png) [@sandeepjack](https://community.postman.com/u/sandeepjack)\
**Post date:** [October 19, 2022, 6:43am UTC](https://community.postman.com/t/request-failing-with-assertionerror/40192/1 "2022-10-19T06:43:20Z")

</div>

![Screenshot from 2022-10-19 11-59-09](https://us1.discourse-cdn.com/getpostman/original/3X/2/6/2693afdbe90149814bc1cfa4beb6a2dcc6f3700d.png)

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [October 19, 2022, 9:51am UTC](https://community.postman.com/t/request-failing-with-assertionerror/40192/2 "2022-10-19T09:51:46Z")

</div>

That doesn’t look right.

The test for checking status code 200 is the following.

```auto
pm.test("Status code is 200", () => {
  pm.response.to.have.status(200);
});

```

Remember to make your test fail as well.

```auto
pm.test("Status code is 200", () => {
  pm.response.to.have.status(100);
});

```
