moleculer-db
moleculer-db copied to clipboard
export Errors as property
For consistency's sake the Errors should be available from the export just like the moleculer and moleculer-web modules. No need to have this:
const { ValidationError } = require("moleculer").Errors;
const { NotFoundError } = require("moleculer-web").Errors;
const { EntityNotFoundError } = require("moleculer-db/src/errors");
but instead:
const { ValidationError } = require("moleculer").Errors;
const { NotFoundError } = require("moleculer-web").Errors;
const { EntityNotFoundError } = require("moleculer-db").Errors;
Good idea, could you create a PR?