@venncity/errors
Advanced tools
Comparing version 1.5.2 to 1.6.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [1.6.0](https://github.com/venn-city/npm-shelf/compare/@venncity/errors@1.5.2...@venncity/errors@1.6.0) (2020-01-01) | ||
### Features | ||
* **errors:** added logLevel parameter in validator ([1e3bf71](https://github.com/venn-city/npm-shelf/commit/1e3bf71)) | ||
## [1.5.2](https://github.com/venn-city/npm-shelf/compare/@venncity/errors@1.5.1...@venncity/errors@1.5.2) (2019-12-22) | ||
@@ -8,0 +19,0 @@ |
{ | ||
"name": "@venncity/errors", | ||
"version": "1.5.2", | ||
"version": "1.6.0", | ||
"author": "Venn Engineering", | ||
@@ -29,3 +29,3 @@ "main": "src/index.js", | ||
}, | ||
"gitHead": "73e9be7c91ffdb543feeff5160401172abe10fb9" | ||
"gitHead": "ce914ded1d8f90aca6e40c878b4aee63e640de91" | ||
} |
const Joi = require('joi'); | ||
const { ServerDataValidationError, UnknownError, codes } = require('./../errors/errors'); | ||
const { ServerDataValidationError, UnknownError, codes, SUPPORTED_LOG_LEVELS } = require('./../errors/errors'); | ||
@@ -8,2 +8,3 @@ function assert(value, schema, { | ||
clientVisible, | ||
logLevel = SUPPORTED_LOG_LEVELS.ERROR, | ||
joiOptions: { | ||
@@ -24,3 +25,3 @@ abortEarly = false, | ||
if (clientVisible !== undefined) { | ||
throw new ValidationError({ cause: e, message, clientVisible }); | ||
throw new ValidationError({ cause: e, message, clientVisible, logLevel }); | ||
} | ||
@@ -27,0 +28,0 @@ throw new ValidationError({ cause: e, message }); |
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
13470
290