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

[JS Wrapper] Custom error thrown when no entries found #77

Closed
genaris opened this issue Jan 20, 2023 · 1 comment · Fixed by #111
Closed

[JS Wrapper] Custom error thrown when no entries found #77

genaris opened this issue Jan 20, 2023 · 1 comment · Fixed by #111
Assignees

Comments

@genaris
Copy link
Contributor

genaris commented Jan 20, 2023

There are certain use cases where Askar JS is throwing a custom error (code 100) when I think it would be more appropriate to throw a specific error. These are the cases I've found during an initial integration with aries-framework-javascript:

  • Session.fetch and no entry has been found (should be NotFound or simply return undefined, as current API suggests)
  • Session.fetchKey and no entry has been found (should be NotFound as current API suggests)
  • Scan.fetchAll/Session.fetchAllKeys and no entries matching the query have been found (should be NotFound or simply return an empty array)
@TimoGlastra
Copy link
Contributor

This is fixed by #111

@TimoGlastra TimoGlastra self-assigned this Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants