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

Config.get(...) should raise interface-datastore.errors.notFound #197

Closed
AuHau opened this issue May 10, 2019 · 1 comment
Closed

Config.get(...) should raise interface-datastore.errors.notFound #197

AuHau opened this issue May 10, 2019 · 1 comment
Labels
exp/novice Someone with a little familiarity can pick up kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up status/ready Ready to be worked

Comments

@AuHau
Copy link
Member

AuHau commented May 10, 2019

I am not 100% sure about this, but while working on integrating the js-ipfs-repo-migrations I stumbled on a case where I have expected to ipfs-repo throw an interface-datastore.errors.notFound error when config.get() won't find the required key.

I now that interface-datastore.errors are related to datastores and this is only somehow related to it as ipfs-repo.config creates an abstraction layer on top of it. But it would be good to have some easy and clean way how to test for not found errors other than err.message.match('does not exist').

@jacobheun jacobheun added kind/bug A bug in existing code (including security flaws) exp/novice Someone with a little familiarity can pick up P2 Medium: Good to have, but can wait until someone steps up status/ready Ready to be worked labels May 13, 2019
@AuHau
Copy link
Member Author

AuHau commented Aug 7, 2019

Solved by #201 just not by throwing interface-datastore.errors.notFound but by throwing custom error from repo level.

@AuHau AuHau closed this as completed Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/novice Someone with a little familiarity can pick up kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up status/ready Ready to be worked
Projects
None yet
Development

No branches or pull requests

2 participants