@mcma/api
Advanced tools
Comparing version 0.14.4 to 0.14.5
@@ -9,6 +9,6 @@ "use strict"; | ||
super("ApiError", properties); | ||
this.checkProperty("status", "number", true); | ||
this.checkProperty("path", "string", true); | ||
this.checkProperty("message", "string", false); | ||
this.timestamp = this.ensureValidDateOrUndefined(this.timestamp); | ||
core_1.Utils.checkProperty(this, "status", "number", true); | ||
core_1.Utils.checkProperty(this, "path", "string", true); | ||
core_1.Utils.checkProperty(this, "message", "string", false); | ||
this.timestamp = core_1.Utils.ensureValidDateOrUndefined(this.timestamp); | ||
if (!this.timestamp) { | ||
@@ -15,0 +15,0 @@ this.timestamp = new Date(); |
@@ -33,3 +33,3 @@ "use strict"; | ||
setResponseError(statusCode, message) { | ||
if (statusCode < 400 || statusCode > 599) { | ||
if (!(statusCode >= 400 && statusCode < 600)) { | ||
throw new core_1.McmaException("McmaApiRequestContext.setResponseError can only be used to handle 4xx or 5xx errors"); | ||
@@ -36,0 +36,0 @@ } |
{ | ||
"name": "@mcma/api", | ||
"version": "0.14.4", | ||
"version": "0.14.5", | ||
"description": "Node module for building APIs based on the EBU MCMA framework", | ||
@@ -40,12 +40,12 @@ "engines": { | ||
"peerDependencies": { | ||
"@mcma/client": "0.14.4", | ||
"@mcma/core": "0.14.4", | ||
"@mcma/data": "0.14.4", | ||
"@mcma/worker-invoker": "0.14.4" | ||
"@mcma/client": "0.14.5", | ||
"@mcma/core": "0.14.5", | ||
"@mcma/data": "0.14.5", | ||
"@mcma/worker-invoker": "0.14.5" | ||
}, | ||
"devDependencies": { | ||
"@mcma/client": "0.14.4", | ||
"@mcma/core": "0.14.4", | ||
"@mcma/data": "0.14.4", | ||
"@mcma/worker-invoker": "0.14.4", | ||
"@mcma/client": "0.14.5", | ||
"@mcma/core": "0.14.5", | ||
"@mcma/data": "0.14.5", | ||
"@mcma/worker-invoker": "0.14.5", | ||
"@types/node": "^14.17.22", | ||
@@ -52,0 +52,0 @@ "@types/pluralize": "0.0.29", |
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
61454