niamurrell / value-app

Calculate the per-use value of purchases over time.
https://valuemax.herokuapp.com/
MIT License
12 stars 18 forks source link

Handle promise rejections for future Node releases #13

Closed niamurrell closed 6 years ago

niamurrell commented 6 years ago

Expected Behavior

No warnings in the console when running the app.

Actual Behavior

Warning is given:

(node:30405) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)

(node:30405) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

(node:30405) DeprecationWarning: collection.findAndModify is deprecated. Use findOneAndUpdate, findOneAndReplace or findOneAndDelete instead.

Note it's just a warning, the app still runs for now.

Feature Request/Idea

Here is a starter on fixing this issue.

Steps to Reproduce (including precondition)

Run the app and do any action where data is saved/updated.

anacoimbrag commented 6 years ago

Hey! Is this problem still going? I`d like to help you solve it, but I cannot reproduce this here.