@venncity/errors
v2.1.25
Published
![Coverage](https://api.venn.city/production/coverage/badge?branch=master&repository=@venncity/errors)
Downloads
2,294
Readme
Errors
Provides data validation and common error objects.
Error types:
- VennError
- VennUnknownError
- VennForbiddenError
- VennThrottlingError
- VennServerDataValidationError
- VennClientDataValidationError
validator.assert(value, schema, overrides)
Used to validate an object schema against a schema (using the joi dsl - https://github.com/hapijs/joi/blob/v15.0.0/lib/language.js).
The ValidationError
field in the overrides param lets you select what type of error will be thrown upon a validation error.