Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export Errors as property #285

Open
pibi opened this issue Sep 24, 2021 · 1 comment
Open

export Errors as property #285

pibi opened this issue Sep 24, 2021 · 1 comment

Comments

@pibi
Copy link

pibi commented Sep 24, 2021

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;
@icebob
Copy link
Member

icebob commented Sep 25, 2021

Good idea, could you create a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants