diff --git a/simplexmq.cabal b/simplexmq.cabal index d4864ead0..c2a894e6d 100644 --- a/simplexmq.cabal +++ b/simplexmq.cabal @@ -1,7 +1,7 @@ cabal-version: 1.12 name: simplexmq -version: 6.4.3.0 +version: 6.4.4.0 synopsis: SimpleXMQ message broker description: This package includes <./docs/Simplex-Messaging-Server.html server>, <./docs/Simplex-Messaging-Client.html client> and diff --git a/src/Simplex/Messaging/Agent/Store.hs b/src/Simplex/Messaging/Agent/Store.hs index 7eab3fbbd..b523c05ef 100644 --- a/src/Simplex/Messaging/Agent/Store.hs +++ b/src/Simplex/Messaging/Agent/Store.hs @@ -670,7 +670,7 @@ data StoreError | -- | Invitation not found SEInvitationNotFound String InvitationId | -- | Message not found - SEMsgNotFound + SEMsgNotFound String | -- | Command not found SECmdNotFound | -- | Currently not used. The intention was to pass current expected queue status in methods, diff --git a/src/Simplex/Messaging/Agent/Store/AgentStore.hs b/src/Simplex/Messaging/Agent/Store/AgentStore.hs index a21765444..f9495cf01 100644 --- a/src/Simplex/Messaging/Agent/Store/AgentStore.hs +++ b/src/Simplex/Messaging/Agent/Store/AgentStore.hs @@ -967,7 +967,7 @@ createSndMsgDelivery db connId SndQueue {dbQueueId} msgId = getSndMsgViaRcpt :: DB.Connection -> ConnId -> InternalSndId -> IO (Either StoreError SndMsg) getSndMsgViaRcpt db connId sndMsgId = - firstRow toSndMsg SEMsgNotFound $ + firstRow toSndMsg (SEMsgNotFound "getSndMsgViaRcpt") $ DB.query db [sql| @@ -1103,7 +1103,7 @@ getExpiredSndMessages db connId SndQueue {dbQueueId} expireTs = do setMsgUserAck :: DB.Connection -> ConnId -> InternalId -> IO (Either StoreError (RcvQueue, SMP.MsgId)) setMsgUserAck db connId agentMsgId = runExceptT $ do (dbRcvId, srvMsgId) <- - ExceptT . firstRow id SEMsgNotFound $ + ExceptT . firstRow id (SEMsgNotFound "setMsgUserAck") $ DB.query db "SELECT rcv_queue_id, broker_id FROM rcv_messages WHERE conn_id = ? AND internal_id = ?" (connId, agentMsgId) rq <- ExceptT $ getRcvQueueById db connId dbRcvId liftIO $ DB.execute db "UPDATE rcv_messages SET user_ack = ? WHERE conn_id = ? AND internal_id = ?" (BI True, connId, agentMsgId) @@ -1111,7 +1111,7 @@ setMsgUserAck db connId agentMsgId = runExceptT $ do getRcvMsg :: DB.Connection -> ConnId -> InternalId -> IO (Either StoreError RcvMsg) getRcvMsg db connId agentMsgId = - firstRow toRcvMsg SEMsgNotFound $ + firstRow toRcvMsg (SEMsgNotFound "getRcvMsg") $ DB.query db [sql| @@ -1161,7 +1161,7 @@ checkRcvMsgHashExists db connId hash = do getRcvMsgBrokerTs :: DB.Connection -> ConnId -> SMP.MsgId -> IO (Either StoreError BrokerTs) getRcvMsgBrokerTs db connId msgId = - firstRow fromOnly SEMsgNotFound $ + firstRow fromOnly (SEMsgNotFound "getRcvMsgBrokerTs") $ DB.query db "SELECT broker_ts FROM rcv_messages WHERE conn_id = ? AND broker_id = ?" (connId, Binary msgId) deleteMsg :: DB.Connection -> ConnId -> InternalId -> IO ()