Cypress · Middle · Question 37 of 77

What does failOnStatusCode: false in cy.request allow?

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.

Further reading

Problem with a question

Cypress · Middle · question 37

Test yourself

Take the Cypress · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz