diff --git a/src/caosdb/transaction.cpp b/src/caosdb/transaction.cpp index 71e9300d4ebd2290202263d6a930a78c895dd8d7..497629b69b257a8bea6c10f621a9987f8fabc8d2 100644 --- a/src/caosdb/transaction.cpp +++ b/src/caosdb/transaction.cpp @@ -205,14 +205,26 @@ auto Transaction::WaitForIt() const noexcept -> TransactionStatus { switch (responses->wrapped_response_case()) { case WrappedResponseCase::kRetrieveResponse: { auto *entity = responses->mutable_retrieve_response()->release_entity(); + if (!entity->errors().empty()) { + this->status = + TransactionStatus::TRANSACTION_ERROR("The request returned with errors."); + } this->result_set = std::make_unique<UniqueResult>(entity); } break; case WrappedResponseCase::kInsertResponse: { auto *insertedIdResponse = responses->mutable_insert_response(); + if (!insertedIdResponse->entity_errors().empty()) { + this->status = + TransactionStatus::TRANSACTION_ERROR("The request returned with errors."); + } this->result_set = std::make_unique<UniqueResult>(insertedIdResponse); } break; case WrappedResponseCase::kDeleteResponse: { auto *deletedIdResponse = responses->mutable_delete_response(); + if (!deletedIdResponse->entity_errors().empty()) { + this->status = + TransactionStatus::TRANSACTION_ERROR("The request returned with errors."); + } this->result_set = std::make_unique<UniqueResult>(deletedIdResponse); } break; default: