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

Centralize Error Declarations #199

Open
wovalle opened this issue Oct 17, 2020 · 0 comments
Open

Centralize Error Declarations #199

wovalle opened this issue Oct 17, 2020 · 0 comments

Comments

@wovalle
Copy link
Owner

wovalle commented Oct 17, 2020

Fireorm can throw different errors:

  • Firestore errors: Mostly errors thrown by firebase-admin, they should be re-thrown back to the user
  • Validation errors: If validateModels is true, fireorm run models validation on create and update. ValidationError is thrown.
  • Other errors: Other errors that users might face. Usually are thrown new Error('Error text'). There are duplicated errors all over the codebase.

We have errors declarations all over the place and

Acceptance criteria:

  • Refactor new Error()s in the codebase by creating errors in src/Errors
  • Remove duplicated error declarations
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

1 participant