118: queryRecords should return [] when no matching records exist, not an error #121

Merged
telackey merged 1 commits from telackey/118 into main 2023-11-28 20:41:28 +00:00
Member

Whenever a key is used which doesn't exist in the DB at all, an error is returned like this:

[
  {
    message: `rpc error: code = Unknown desc = store doesn't have key: "\\atypeApplicationRecord"`,
    path: [ 'queryRecords' ]
  }
]

That doesn't make any sense, as it is not an error to find out that the thing you asked for does not exist. This changes it to return an empty list.

Whenever a key is used which doesn't exist in the DB at all, an error is returned like this: ``` [ { message: `rpc error: code = Unknown desc = store doesn't have key: "\\atypeApplicationRecord"`, path: [ 'queryRecords' ] } ] ``` That doesn't make any sense, as it is not an error to find out that the thing you asked for does not exist. This changes it to return an empty list.
telackey added 1 commit 2023-11-28 19:30:24 +00:00
118: queryRecords should return [] when no matching records exist, not an error
Some checks failed
Build / cleanup-runs (pull_request) Successful in 5s
Deploy Contract / cleanup-runs (pull_request) Successful in 5s
CodeQL / Analyze (go) (pull_request) Failing after 39s
Deploy Contract / deploy (pull_request) Failing after 36s
Pull Request Labeler / triage (pull_request) Successful in 10s
Build / build (pull_request) Failing after 1m3s
Dependency Review / dependency-review (pull_request) Failing after 1m3s
Run Gosec / Gosec (pull_request) Failing after 13s
Semgrep / Scan (pull_request) Failing after 11s
Tests / cleanup-runs (pull_request) Failing after 5s
Lint / Run flake8 on python integration tests (pull_request) Failing after 34s
Tests / test-unit-cover (pull_request) Failing after 42s
Tests / test-importer (pull_request) Failing after 39s
Lint / Run golangci-lint (pull_request) Failing after 1m27s
Tests / test-rpc (pull_request) Failing after 58s
Tests / sdk_tests (pull_request) Failing after 1m40s
cd144330aa
telackey requested review from dboreham 2023-11-28 19:30:37 +00:00
dboreham approved these changes 2023-11-28 20:31:46 +00:00
telackey merged commit 0adc932400 into main 2023-11-28 20:41:28 +00:00
telackey deleted branch telackey/118 2023-11-28 20:41:29 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/laconicd#121
No description provided.