From 517b05d93d3f111a7eb38ee8fa3b89a13fa22105 Mon Sep 17 00:00:00 2001
From: "Richard T. Carback III" <rick.carback@gmail.com>
Date: Tue, 13 Jun 2023 23:30:06 +0000
Subject: [PATCH] Add the error inthe if statement to the put message error

---
 indexedDb/impl/channels/implementation.go | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/indexedDb/impl/channels/implementation.go b/indexedDb/impl/channels/implementation.go
index 0cb483e3..8dc343af 100644
--- a/indexedDb/impl/channels/implementation.go
+++ b/indexedDb/impl/channels/implementation.go
@@ -451,6 +451,9 @@ func (w *wasmModel) upsertMessage(msg *Message) (uint64, error) {
 					&msg.Hidden,
 					status)
 			}
+			// Add this to the main putMessage error
+			err = errors.Wrapf(err, "bad msg ID: %+v",
+				inErr)
 		}
 		return 0, errors.Errorf("Unable to put Message: %+v\n%s",
 			err, newMessageJson)
-- 
GitLab