From 423e09465940312367d71b3be7a16f4c3dcad8c5 Mon Sep 17 00:00:00 2001 From: Pierre Gayvallet Date: Wed, 22 Nov 2023 10:46:55 +0100 Subject: [PATCH] Disable rison parsing error logs in production (#171660) ## Summary Similar to https://github.com/elastic/kibana/pull/170827 Disable noisy 3rd party lib warning in production mode. --- src/setup_node_env/mute_libraries.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/setup_node_env/mute_libraries.js b/src/setup_node_env/mute_libraries.js index defb6347d80f7..e40ecfe84fa31 100644 --- a/src/setup_node_env/mute_libraries.js +++ b/src/setup_node_env/mute_libraries.js @@ -9,3 +9,11 @@ // disable moment deprecation warnings var moment = require('moment'); moment.suppressDeprecationWarnings = true; + +// disable rison-node parsing errors +// eslint-disable-next-line @kbn/eslint/module_migration +var rison = require('rison-node'); +rison.parser.prototype.error = function (message) { + this.message = message; + return undefined; +};