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 authored Sep 20, 2023
1 parent af415e0 commit 487fccf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,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 487fccf

Please sign in to comment.