diff --git a/lib/fetch/response.js b/lib/fetch/response.js index 7828c2d1b3e..fc6746bfa8d 100644 --- a/lib/fetch/response.js +++ b/lib/fetch/response.js @@ -103,7 +103,7 @@ class Response { // 3. If status is not a redirect status, then throw a RangeError. if (!redirectStatus.includes(status)) { - throw new RangeError('Invalid status code') + throw new RangeError('Invalid status code ' + status) } // 4. Let responseObject be the result of creating a Response object, @@ -478,7 +478,7 @@ function initializeResponse (response, init, body) { if (nullBodyStatus.includes(response.status)) { throw webidl.errors.exception({ header: 'Response constructor', - message: 'Invalid response status code.' + message: 'Invalid response status code ' + response.status }) }