Skip to content

Commit

Permalink
smp protocol: add STORE error (#1372)
Browse files Browse the repository at this point in the history
  • Loading branch information
epoberezkin authored Oct 18, 2024
1 parent e0cd28a commit 77ee9be
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Simplex/Messaging/Protocol.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,8 @@ data ErrorType
CRYPTO
| -- | SMP queue capacity is exceeded on the server
QUOTA
| -- | SMP server storage error
STORE {storeErr :: String}
| -- | ACK command is sent without message to be acknowledged
NO_MSG
| -- | sent message is too large (> maxMessageLength = 16088 bytes)
Expand Down Expand Up @@ -1513,6 +1515,7 @@ instance Encoding ErrorType where
AUTH -> "AUTH"
CRYPTO -> "CRYPTO"
QUOTA -> "QUOTA"
STORE err -> "STORE " <> smpEncode err
EXPIRED -> "EXPIRED"
NO_MSG -> "NO_MSG"
LARGE_MSG -> "LARGE_MSG"
Expand All @@ -1528,6 +1531,7 @@ instance Encoding ErrorType where
"AUTH" -> pure AUTH
"CRYPTO" -> pure CRYPTO
"QUOTA" -> pure QUOTA
"STORE" -> STORE <$> _smpP
"EXPIRED" -> pure EXPIRED
"NO_MSG" -> pure NO_MSG
"LARGE_MSG" -> pure LARGE_MSG
Expand Down

0 comments on commit 77ee9be

Please sign in to comment.