Skip to content

Commit 77ee9be

Browse files
authored
smp protocol: add STORE error (#1372)
1 parent e0cd28a commit 77ee9be

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Simplex/Messaging/Protocol.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,6 +1198,8 @@ data ErrorType
11981198
CRYPTO
11991199
| -- | SMP queue capacity is exceeded on the server
12001200
QUOTA
1201+
| -- | SMP server storage error
1202+
STORE {storeErr :: String}
12011203
| -- | ACK command is sent without message to be acknowledged
12021204
NO_MSG
12031205
| -- | sent message is too large (> maxMessageLength = 16088 bytes)
@@ -1513,6 +1515,7 @@ instance Encoding ErrorType where
15131515
AUTH -> "AUTH"
15141516
CRYPTO -> "CRYPTO"
15151517
QUOTA -> "QUOTA"
1518+
STORE err -> "STORE " <> smpEncode err
15161519
EXPIRED -> "EXPIRED"
15171520
NO_MSG -> "NO_MSG"
15181521
LARGE_MSG -> "LARGE_MSG"
@@ -1528,6 +1531,7 @@ instance Encoding ErrorType where
15281531
"AUTH" -> pure AUTH
15291532
"CRYPTO" -> pure CRYPTO
15301533
"QUOTA" -> pure QUOTA
1534+
"STORE" -> STORE <$> _smpP
15311535
"EXPIRED" -> pure EXPIRED
15321536
"NO_MSG" -> pure NO_MSG
15331537
"LARGE_MSG" -> pure LARGE_MSG

0 commit comments

Comments
 (0)