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

Index error found should return block not found #158

Merged
merged 1 commit into from
Jul 15, 2021

Conversation

aarshkshah1992
Copy link
Contributor

@aarshkshah1992 aarshkshah1992 commented Jul 15, 2021

There's blockstore dependent code in our libraries that depends on this particular error if a block does NOT exist.

Copy link
Member

@masih masih left a comment

Choose a reason for hiding this comment

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

Thank you for pointing this out

@masih masih merged commit 1789ec2 into wip-v2 Jul 15, 2021
@masih masih deleted the feat/correct-block-not-found-error branch July 15, 2021 08:26
@masih masih added this to the CAR v2 milestone Jul 15, 2021
masih added a commit that referenced this pull request Jul 15, 2021
Fix an issue where single width index not finding a given key returns
`0` offset instead of `index.ErrNotFound`.

Reflect the changes in blockstore to return appropriate IPFS blockstore
error.

Add tests that asserts error types both in index and blockstore
packages.

Remove redundant TODOs.

Relates to:
- #158
mvdan pushed a commit that referenced this pull request Jul 16, 2021
Fix an issue where single width index not finding a given key returns
`0` offset instead of `index.ErrNotFound`.

Reflect the changes in blockstore to return appropriate IPFS blockstore
error.

Add tests that asserts error types both in index and blockstore
packages.

Remove redundant TODOs.

Relates to:
- #158
Jorropo pushed a commit to ipfs/boxo that referenced this pull request Mar 22, 2023
Fix an issue where single width index not finding a given key returns
`0` offset instead of `index.ErrNotFound`.

Reflect the changes in blockstore to return appropriate IPFS blockstore
error.

Add tests that asserts error types both in index and blockstore
packages.

Remove redundant TODOs.

Relates to:
- ipld/go-car#158


This commit was moved from ipld/go-car@7751d8b
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