From 25a3b625fa77a1ac87de3f6e99e8efa390fc63e9 Mon Sep 17 00:00:00 2001
From: Siyuan Miao <i@xswan.net>
Date: Sun, 18 May 2025 22:40:25 +0200
Subject: [PATCH] chore: update error message

---
 internal/usbgadget/config_tx.go | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/internal/usbgadget/config_tx.go b/internal/usbgadget/config_tx.go
index bede2fc..b4f1be0 100644
--- a/internal/usbgadget/config_tx.go
+++ b/internal/usbgadget/config_tx.go
@@ -96,7 +96,12 @@ func (tx *UsbGadgetTransaction) removeFile(component string, path string, descri
 }
 
 func (tx *UsbGadgetTransaction) Commit() error {
-	tx.log.Info().Interface("transaction", tx.c.Apply()).Msg("committing transaction")
+	err := tx.c.Apply()
+	if err != nil {
+		tx.log.Error().Err(err).Msg("failed to update usbgadget configuration")
+		return err
+	}
+	tx.log.Info().Msg("usbgadget configuration updated")
 	return nil
 }