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

Printing the actual error message when Model.set fails #133

Merged
merged 1 commit into from Apr 5, 2022

Conversation

sezanzeb
Copy link
Contributor

@sezanzeb sezanzeb commented Jan 17, 2022

If the function provided via set throws an error, it will hide the error message, which makes it hard to debug.

  column: {
    ...
    set: () => { throw new Error('foo bar') }
  },

before:

Error: Error using Model.set method for model Product property ... (possibly due to the use of instance methods). You should use option ignoreSet: true.
    at node_modules/sequelize-fixtures/lib/loader.js:105:29

after:

Error: Error using Model.set method for model Product property ... (possibly due to the use of instance methods). You should use option ignoreSet: true.
Error: foo bar
    at node_modules/sequelize-fixtures/lib/loader.js:105:29

Copy link
Collaborator

@matmar10 matmar10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution.

@matmar10 matmar10 merged commit 657dc8e into domasx2:master Apr 5, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants