Skip to content

Cypress does-not continue test with HTTP_ERROR_CODE = 400 even when request is set to failOnStatusCode: false #31353

Closed
@kushal-omnius

Description

@kushal-omnius

Current behavior

For all other status codes except HTTP_ERROR_CODE = 400 with request is set to failOnStatusCode: false, test is rightfully continued

Desired behavior

HTTP_ERROR_CODE = 400 with request is set to failOnStatusCode: false, test is should be continued

Test code to reproduce

Create a request which will end up in a HTTP_ERROR_CODE = 400

	cy.request({
		method: 'POST',
		url: endpointUrl,
		body: requestBody,
		failOnStatusCode: false
	}).as('postCollectionPredictorJobs');

console.log("test doesn't reach here")

Image

Cypress Version

v14.2.0

Node version

v22.9.0

Operating System

Windows 11

Debug Logs

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions