Cypress · Middle · Question 37 of 77
What does failOnStatusCode: false in cy.request allow?
- 1Asserting on 4xx or 5xx responses instead of failing
- 2Ignoring all errors in the rest of the spec
- 3Retrying the request until it returns 200
Show the answer
Correct answer: Asserting on 4xx or 5xx responses instead of failing
Explanation
By default non-2xx/3xx responses fail the test. Turn it off when the error response is what you want to check.