generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 101
Open
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershacktoberfestFor the hacking month of OctoberFor the hacking month of OctoberrefactoringCode refactoring with no functional impactCode refactoring with no functional impact
Description
In index-level.ts, there are at least a couple of places where we accept invalid input and either return void/empty array instead of throwing explicit errors.
It is probably better to throw instead so that the caller does not assume the method succeeds with no results:
queryWithInMemoryPaging()
// if a cursor is provided but we cannot find it, we return an empty result set
return [];getStartingKeyForCursor()
if (indexes === undefined) {
// invalid itemId
return;
}
const sortValue = indexes[property];
if (sortValue === undefined) {
// invalid sort property
return;
}Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershacktoberfestFor the hacking month of OctoberFor the hacking month of OctoberrefactoringCode refactoring with no functional impactCode refactoring with no functional impact