Skip to content

Commit

Permalink
fix: statusCode allow 999
Browse files Browse the repository at this point in the history
https://lodash.com/docs/#inRange `end` is exclusive, so it needs to be set to 1000 to allow status code 999 to be included (as per documented).
  • Loading branch information
riwu committed Sep 21, 2023
1 parent 381b505 commit 6a2d9b6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ _Released 09/19/2023 (PENDING)_

- Introduces new layout for Runs page providing additional run information. Addresses [#27203](https://github.com/cypress-io/cypress/issues/27203).

**Bugfixes:**

- Fixed network stubbing not permitting status code 999. Fixes [#27567](https://github.com/cypress-io/cypress/issues/27567). Addressed in [#27853](https://github.com/cypress-io/cypress/pull/27853).

## 13.2.0

_Released 09/12/2023_
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function validateStaticResponse (cmd: string, staticResponse: StaticRespo

// statusCode must be a three-digit integer
// @see https://tools.ietf.org/html/rfc2616#section-6.1.1
if (statusCode && !(_.isNumber(statusCode) && _.inRange(statusCode, 100, 999))) {
if (statusCode && !(_.isNumber(statusCode) && _.inRange(statusCode, 100, 1000))) {
err('`statusCode` must be a number between 100 and 999 (inclusive).')
}

Expand Down

0 comments on commit 6a2d9b6

Please sign in to comment.