bzarras / newsapi

A promise-based node interface for NewsAPI
MIT License
144 stars 39 forks source link

Api Node Version Error #16

Closed asmaa3107 closed 4 years ago

asmaa3107 commented 5 years ago

I am Calling your api for news app. I need to show News Categories and it's articles so when using your code I found this Error:

(node:3148) UnhandledPromiseRejectionWarning: NewsAPIError: parametersIncompatible: You cannot mix the sources parameter with the country or category parameters. atD:\Full\BackEnd\node_modules\newsapi\dist\index.js:272:40 at <anonymous> at process._tickCallback (internal/process/next_tick.js:189:7) (node:3148) 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:3148) [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.

Any Help !!

bzarras commented 5 years ago

@asmaa3107 Take notice of the error message:

You cannot mix the sources parameter with the country or category parameters

If you're using a combination of those parameters, try removing one. Let me know if that helps.