-
Notifications
You must be signed in to change notification settings - Fork 96
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
Replace silent failures with explicit failures in index-level.ts
#633
Comments
Hi @thehenrytsai I would like to work on this issue. Can you please assign this to me? |
The two methods that you have specified above, I can't find them in index-level.ts file. Were these (queryWithInMemoryPaging(), getStartingKeyForCursor() ) examples? |
I have just found one place where we are not returning anything in the index-level.ts file. https://github.com/TBD54566975/dwn-sdk-js/blob/main/src/store/index-level.ts#L157C14-L157C14, this is the only place. Let me know if there are more of these. |
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()
getStartingKeyForCursor()
The text was updated successfully, but these errors were encountered: