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

cart.js: No 'new' on util.error #4

Merged
merged 1 commit into from
Apr 3, 2017

Conversation

amnotafraid
Copy link
Contributor

If I have a bad product_id when I try to POST to /cart/add-item, I get error messages that start out like this:

TypeError: util.error is not a constructor
    at schema.get.then.product (/Users/razoyo-dev/apps2/schema-node-api/api/v1/cart.js:371:13)

This change fixes it, but do you want to do new Error(... rather than util.error(...?

@ericingram
Copy link
Contributor

Looks like it was an "error" to have used the new keyword here in the first place. Fix looks good, thank you!

@ericingram ericingram merged commit 94c135d into schemaio:master Apr 3, 2017
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.

2 participants