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

No longer considers a non-existant repo an error. #30

Merged
merged 1 commit into from
Mar 19, 2016

Conversation

hackergrrl
Copy link
Contributor

Calling repo.exists() on a repo that doesn't exist would return an error
rather than false, which would also mask whatever the underlying error
really was.

Calling repo.exists() on a repo that doesn't exist would return an error
rather than false, which would also mask whatever the underlying error
really was.
this.exists((err, exists) => {
if (err) { throw err }
if (exists) { throw new Error('Repo already exists') }
throw new Error('not implemented')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'not implemented' or 'repo not found'?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no further implementation of repo.init yet, so 'not implemented' seemed fitting.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it! :)

@daviddias
Copy link
Member

sweet, good catch! :) thank you noffle. Just made a tiny comment

@hackergrrl
Copy link
Contributor Author

Ah, sorry, just saw your comments :)

@hackergrrl hackergrrl mentioned this pull request Mar 19, 2016
7 tasks
daviddias added a commit that referenced this pull request Mar 19, 2016
No longer considers a non-existant repo an error.
@daviddias daviddias merged commit 10b9f29 into ipfs:master Mar 19, 2016
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 this pull request may close these issues.

2 participants