queryRecords should return [] when no records of the type exist, not an error #118

Closed
opened 2023-11-22 20:06:58 +00:00 by telackey · 3 comments
Member

When queryRecords is executed for a type which has zero records in the DB, it returns an error:

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

This happens even for valid types. As soon as any record of the type is added, the error goes away, even if no entries match the rest of the query criteria.

When queryRecords is executed for a type which has zero records in the DB, it returns an error: ``` [ { message: `rpc error: code = Unknown desc = store doesn't have key: "\\atypeApplicationRecord"`, path: [ 'queryRecords' ] } ] ``` This happens even for valid types. As soon as any record of the type is added, the error goes away, even if no entries match the rest of the query criteria.
Author
Member

Same thing for names, which will probably be more common:

[
  {
    message: `rpc error: code = Unknown desc = store doesn't have key: "\\anamemy-app-record"`,
    path: [ 'queryRecords' ]
  }
]
Same thing for names, which will probably be more common: ``` [ { message: `rpc error: code = Unknown desc = store doesn't have key: "\\anamemy-app-record"`, path: [ 'queryRecords' ] } ] ```
Owner

FWIW this should be fixed on cerc-io/laconicd#111: d82c676777

FWIW this should be fixed on https://git.vdb.to/cerc-io/laconicd/pulls/111: https://git.vdb.to/cerc-io/laconicd/commit/d82c6767775b91b973bea3baeeaa1424954a48d0
Author
Member

Excellent. Also fixed by cerc-io/laconicd#121, which was merged yesterday.

Excellent. Also fixed by https://git.vdb.to/cerc-io/laconicd/pulls/121, which was merged yesterday.
Sign in to join this conversation.
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-deprecated#118
No description provided.