Comparing version 1.2.0 to 1.2.1
# Changelog | ||
## 1.2.1 | ||
- Suppress invalid HTTP Errors <https://github.com/danvk/crosswalk/issues/6> | ||
## 1.2 | ||
@@ -4,0 +8,0 @@ |
@@ -22,2 +22,3 @@ "use strict"; | ||
var ajv_1 = __importDefault(require("ajv")); | ||
var http_1 = require("http"); | ||
/** Throw this in a handler to produce an HTTP error response */ | ||
@@ -97,3 +98,3 @@ var HTTPError = /** @class */ (function (_super) { | ||
// With target below ES2015, instanceof doesn't work here. | ||
if (error instanceof HTTPError || error.code) { | ||
if (error instanceof HTTPError || (error.code && http_1.STATUS_CODES[error.code])) { | ||
response.status(error.code).json({ error: error.message }); | ||
@@ -100,0 +101,0 @@ } |
{ | ||
"name": "crosswalk", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Type-safe express routing with TypeScript", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
Network access
Supply chain riskThis module accesses the network.
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
264909
41
1192
2