public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH proxmox-backup] EncryptionKeysView: Fix API2 error alert messages
@ 2026-04-28 15:09 Arthur Bied-Charreton
  0 siblings, 0 replies; only message in thread
From: Arthur Bied-Charreton @ 2026-04-28 15:09 UTC (permalink / raw)
  To: pbs-devel

The errors returned by the encryption-keys and tape-encryption-keys
endpoints are not plain strings, so the alerts displayed on API2 errors
like failed permission checks end up being empty and therefore not very
helpful.

Extract the error messages to display them correctly in alerts.

Signed-off-by: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
---
 www/config/EncryptionKeysView.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/config/EncryptionKeysView.js b/www/config/EncryptionKeysView.js
index 0f9367c7..bb327814 100644
--- a/www/config/EncryptionKeysView.js
+++ b/www/config/EncryptionKeysView.js
@@ -168,7 +168,7 @@ Ext.define('PBS.config.EncryptionKeysView', {
                     });
                 }
             } catch (error) {
-                Ext.Msg.alert(gettext('Error'), error);
+                Ext.Msg.alert(gettext('Error'), error.result?.message || gettext('Unknown error'));
             }
 
             try {
@@ -181,7 +181,7 @@ Ext.define('PBS.config.EncryptionKeysView', {
                     });
                 }
             } catch (error) {
-                Ext.Msg.alert(gettext('Error'), error);
+                Ext.Msg.alert(gettext('Error'), error.result?.message || gettext('Unknown error'));
             }
 
             let store = view.getStore().rstore;
-- 
2.47.3




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-04-28 15:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-28 15:09 [PATCH proxmox-backup] EncryptionKeysView: Fix API2 error alert messages Arthur Bied-Charreton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal