throw correct error for missing file

This commit is contained in:
IC Rainbow
2024-01-04 13:27:26 +02:00
parent e80dfc588b
commit 05057d550f
+1 -1
View File
@@ -981,7 +981,7 @@ getLocalCryptoFile db userId fileId sent =
[(Nothing, Nothing, FPLocal)] -> do
LocalFileMeta {filePath, fileCryptoArgs} <- getLocalFileMeta db userId fileId
pure $ CryptoFile filePath fileCryptoArgs
_ -> throwError $ SEBadFileTransfer fileId
_ -> throwError $ SEFileNotFound fileId
updateDirectCIFileStatus :: forall d. MsgDirectionI d => DB.Connection -> VersionRange -> User -> Int64 -> CIFileStatus d -> ExceptT StoreError IO AChatItem
updateDirectCIFileStatus db vr user fileId fileStatus = do