Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

flora-errors

Package Overview
Dependencies
Maintainers
4
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flora-errors - npm Package Compare versions

Comparing version 0.9.1 to 2.0.0-alpha.1

10

index.js

@@ -85,2 +85,10 @@ 'use strict';

class ValidationError extends RequestError {
constructor(message, validation) {
super(message);
this.code = 'ERR_VALIDATION_ERROR';
this.validation = validation;
}
}
/**

@@ -101,2 +109,3 @@ * Converts an error object to a stringifyable object format for use

if (err.code) error.code = err.code;
if (err.validation) error.validation = err.validation;

@@ -125,4 +134,5 @@ if (options.exposeErrors) {

ConnectionError,
ValidationError,
FloraError,
format
};

2

package.json
{
"name": "flora-errors",
"version": "0.9.1",
"version": "2.0.0-alpha.1",
"description": "Error definitions for Flora",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -50,4 +50,9 @@ # Flora Errors

### ValidationError
There is a problem validating input data. This is a special case of `RequestError`. HTTP status code `400`.
Error code is `ERR_VALIDATION_ERROR`. Second parameter of constructor will be added as additional `validation` property.
## License
[MIT](LICENSE)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc