Open flyingmachine opened 1 year ago
@flyingmachine Sorry, I just now saw this when browsing issues. We implemented a change recently to disallow persisting empty transactions (or transactions that have just an @id
, which is insufficient) in the first place (issue: https://github.com/fluree/db/issues/402, PR: https://github.com/fluree/db/pull/407).
I realize this does not address all of this feedback, but I wanted to make you aware of the change in case you weren't already. A user attempting to create a ledger with an empty transaction will now get an error like "Invalid transaction, transaction node contains no properties for: @id: http://example.org/ns/someone"
.
So they will at least receive that error when they attempt it in the first place, instead of getting a misleading success response and then getting a confusing error the next time they interact with the ledger.
If you create a ledger with an empty
txn
:And then transact data:
The response includes an error with the message
"Commit has neither assertions or retractions!"
.I found this to be confusing and have some concerns:
/create-ledger
or/ledger/create
might be clearer?txn
in ledger creation seems to come solely from the need to satisfy some internal implementation details of Fluree, and I don't think we should make it the user's responsibility to do thistxn
so that they can satisfy this requirement, and I don't think that we should create a scenario where we're encouraging users to include junk datatxn
on ledger creation helps users get their work done