d2l-lms-launch-darkly-feature-converter-plugin
Advanced tools
Comparing version 0.0.0 to 0.0.1
{ | ||
"name": "d2l-lms-launch-darkly-feature-converter-plugin", | ||
"version": "0.0.0", | ||
"version": "0.0.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -39,3 +39,3 @@ const _ = require( 'lodash' ); | ||
instanceId => `instance:${ instanceId }` | ||
) | ||
); | ||
@@ -42,0 +42,0 @@ return { |
@@ -6,2 +6,12 @@ const Ajv = require( 'ajv' ); | ||
class JsonValidationError extends Error { | ||
constructor( message, details, ...args ) { | ||
super( message, ...args ); | ||
this.details = details; | ||
Error.captureStackTrace( this, JsonValidationError ); | ||
} | ||
} | ||
module.exports = class JsonSchemaValidator { | ||
@@ -20,6 +30,5 @@ | ||
const errors = this._schemaValidator.errors; | ||
const errorsJson = JSON.stringify( errors, null, '\t' ); | ||
throw new Error( `Invalid feature definition: ${errorsJson}` ); | ||
const details = this._schemaValidator.errors; | ||
throw new JsonValidationError( 'Invalid feature definition', details ); | ||
} | ||
}; |
Sorry, the diff of this file is not supported yet
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
70226
42
2752