celestiaorg / celestiaorg/celestia-node
refactor(share/getter): remove ErrNotFound
- Dominant language
- Go
- Stars
- 996
- Forks
- 1.1k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 34
Description
### Implementation ideas
`ErrNotFound` is the error that returned when getter is unable to get data. For store getter it indicates that there is no data, while for shrex and ipld getter it is only possible in multiple cases, that in common only possible if user provided ctx deadline was reached or ctx was canceled. So for shrex and ipld getter it implies, that request that returned `ErrNotFound` could be retried and succeed. It is inconsistent between multiple getters. and needs to be cleaned up.
There is no need to unified error on getter interface level and we could use:
- store.ErrNotFound local error for store getter
- context error for all other cases.
Remove share.ErrNotFound and all related handling in favour of context errors or generic error handling.
Contributor guide
Assessment
This issue has not been assessed yet.