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