From 01b465beae325c88fe6539303ddbdf1cc1cb80a7 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Wed, 16 Aug 2023 18:46:54 -0400 Subject: [PATCH 1/3] status/keyboard: Add a catch around reload call Now that system input settings can get used in the user session they're getting seen by the tests and the tests are complaining: Unhandled promise rejection. To suppress this warning, add an error handler to your promise chain with .catch() or a try-catch block around your await expression. This commit adds the catch it's asking for. --- js/ui/status/keyboard.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js index 747da0122d..29e25eeefa 100644 --- a/js/ui/status/keyboard.js +++ b/js/ui/status/keyboard.js @@ -202,7 +202,9 @@ class InputSourceSystemSettings extends InputSourceSettings { this._variants = ''; this._options = ''; - this._reload(); + this._reload().catch(error => { + logError(error, 'Could not reload system input settings'); + }); Gio.DBus.system.signal_subscribe(this._BUS_NAME, this._BUS_PROPS_IFACE, -- GitLab