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

generic-sequelize-errors

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generic-sequelize-errors - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

4

index.js

@@ -8,3 +8,3 @@ var errors = require('generic-errors');

.keys(error.fields)
.reduce(function (acc, key, index, arr) {
.reduce(function (acc, key) {
acc[key] = error.get(key).map((fieldError) => fieldError.message);

@@ -17,3 +17,3 @@ return acc;

}
if (error instanceof Sequelize.BaseError) {
if (error instanceof Sequelize.Error) {
return new errors.BaseError({ message: error.message });

@@ -20,0 +20,0 @@ }

{
"name": "generic-sequelize-errors",
"version": "1.0.0",
"version": "1.0.1",
"description": "Map Sequelize errors to errors provided by generic-errors",

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

@@ -71,3 +71,3 @@ var test = require('tape');

var testSequelize = {
BaseError,
Error: BaseError, // For some reason Sequelize has chosen not to document this name change
ValidationError,

@@ -94,3 +94,3 @@ DatabaseError,

var testError = new BaseError('some message');
var testError = new testSequelize.Error('some message');

@@ -121,3 +121,3 @@ t.equal(typeof genericSequeliseError, 'function', 'module is a function');

var testError = new testSequelize.BaseError('some message');
var testError = new testSequelize.Error('some message');
var expectedError = new errors.BaseError({ message: 'some message' });

@@ -124,0 +124,0 @@ var expectedType = errors.BaseError;

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