Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disallow creating or updating a record without any data. #432

Open
LiranCohen opened this issue Feb 26, 2024 · 0 comments
Open

Disallow creating or updating a record without any data. #432

LiranCohen opened this issue Feb 26, 2024 · 0 comments
Labels
package: api @web5/api pacakge

Comments

@LiranCohen
Copy link
Member

Prior to TBD54566975/dwn-sdk-js#629, dwn-sdk-js would return an error if you attempted to write a record without any data.

But now that we allow initial writes to be written without data, but not returned in a query, this could cause some confusion/errors as @csuwildcat has experienced.

  • records.write(...) in DwnApi should throw if no data is provided.
  • record.update(...) in Record should throw if no data is provided.
@LiranCohen LiranCohen added the package: api @web5/api pacakge label Feb 26, 2024
@frankhinek frankhinek added this to the @web5/api 0.10 milestone Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: api @web5/api pacakge
Projects
None yet
Development

No branches or pull requests

2 participants