V
V
vetsmen2017-02-14 19:30:46
JavaScript
vetsmen, 2017-02-14 19:30:46

Logging modules - how to disable?

Good day, how can I disable module logging?
For example, I have the passport-vkontakte module, when it receives an incorrect token (even I myself can enter an incorrect token with a get request), I receive the following in the console in response:

TokenError: Code is invalid or expired. + 10 строк ошибок

Very sad, because anyone can flood the console with a single get request. NODE_ENV is worth production. Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill, 2017-02-14
@kirill89

Most likely you have an uncaught exception from a promise. You just need to handle the exception with the final ".catch()" in every place where the module's API is used. In this case, you can simply ignore the exception, or log it in a more suitable way for you.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question