Comparing version 5.4.2 to 5.5.0
@@ -114,3 +114,3 @@ 'use strict'; | ||
e.fileName = urlLib.format(opts); | ||
err = new got.ParseError(e, opts); | ||
err = new got.ParseError(e, statusCode, opts); | ||
} | ||
@@ -366,4 +366,9 @@ } | ||
got.ReadError = createErrorClass('ReadError', stdError); | ||
got.ParseError = createErrorClass('ParseError', stdError); | ||
got.ParseError = createErrorClass('ParseError', function (e, statusCode, opts) { | ||
stdError.call(this, e, opts); | ||
this.statusCode = statusCode; | ||
this.statusMessage = nodeStatusCodes[this.statusCode]; | ||
}); | ||
got.HTTPError = createErrorClass('HTTPError', function (statusCode, opts) { | ||
@@ -370,0 +375,0 @@ stdError.call(this, {}, opts); |
{ | ||
"name": "got", | ||
"version": "5.4.2", | ||
"version": "5.5.0", | ||
"description": "Simplified HTTP/HTTPS requests", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -183,3 +183,3 @@ <h1 align="center"> | ||
Each error contains (if available) `host`, `hostname`, `method` and `path` properties to make debugging easier. | ||
Each error contains (if available) `statusCode`, `statusMessage`, `host`, `hostname`, `method` and `path` properties to make debugging easier. | ||
@@ -186,0 +186,0 @@ In Promise mode, the `response` is attached to the error. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20489
304