Refactor/endpoint encryptors and decryptors#433
Conversation
imaTik0
left a comment
There was a problem hiding this comment.
In every mapper (ThreadDataSchemaMapper.cpp, StoreDataSchemaMapper.cpp, InboxDataSchemaMapper.cpp, KvdbDataSchemaMapper.cpp, MessageDataSchemaMapper.cpp, StreamRoomDataSchemaMapper.cpp) the decrypt + deduplication loop catches only core::Exception:
} catch (const core::Exception& e) {
result[i] = toLibThread(thread, {}, {}, e.getCode(), ThreadDataSchema::Version::UNKNOWN);
}
The previous code had three levels (core::Exception, privmx::utils::PrivmxException, (...)). If keyMapIt->second.at(keyId) throws std::out_of_range (a single missing keyId inside the batch), or anything from a lower-level library throws something other than core::Exception, the whole batch blows up instead of marking just that one record as failed.
* feat: IDecryptStrategy * refactor: added DataStrategy for thread module and removed unused V1, V2, V3 formats * refactor: added DataStrategy for store module and removed unused V1, V2, V3 formats * refactor: added DataStrategy for inbox module * refactor: added DataStrategy for kvdb module * refactor: added DataStrategy for event module and removed unused V1 * refactor: added DataStrategy for stream module * refactor: formating * fix: post review changes
No description provided.