Lines Matching refs:statusCode
34 const statusCode = res.statusCode;
36 …if (isRedirect(statusCode) && opts.followRedirect && 'location' in res.headers && (opts.method ===…
40 ee.emit('error', new got.MaxRedirectsError(statusCode, opts), null, res);
109 const statusCode = res.statusCode;
118 throw new got.ParseError(e, statusCode, opts, data);
122 if (statusCode < 200 || statusCode > limitStatusCode) {
123 throw new got.HTTPError(statusCode, opts);
177 const statusCode = res.statusCode;
181 if (statusCode < 200 || statusCode > 299) {
182 proxy.emit('error', new got.HTTPError(statusCode, opts), null, res);
343 got.ParseError = createErrorClass('ParseError', function (e, statusCode, opts, data) { argument
345 this.statusCode = statusCode;
346 this.statusMessage = http.STATUS_CODES[this.statusCode];
350 got.HTTPError = createErrorClass('HTTPError', function (statusCode, opts) { argument
352 this.statusCode = statusCode;
353 this.statusMessage = http.STATUS_CODES[this.statusCode];
354 this.message = `Response code ${this.statusCode} (${this.statusMessage})`;
357 got.MaxRedirectsError = createErrorClass('MaxRedirectsError', function (statusCode, opts) { argument
359 this.statusCode = statusCode;
360 this.statusMessage = http.STATUS_CODES[this.statusCode];