Skip to content

[block-store] return ErrNotFound instead of default error type#90

Merged
cendhu merged 2 commits intohyperledger:mainfrom
cendhu:return-not-found-blk-store
Mar 9, 2026
Merged

[block-store] return ErrNotFound instead of default error type#90
cendhu merged 2 commits intohyperledger:mainfrom
cendhu:return-not-found-blk-store

Conversation

@cendhu
Copy link
Contributor

@cendhu cendhu commented Mar 9, 2026

Type of change

  • Improvement (improvement to code, performance, etc)

Description

Currently, the committer sends NotFound grpc error code for block APIs by parsing the error message. As this is fragile, this commit adds ErrNotFound error so that the committer can use errors.Is().

Related issues

@cendhu cendhu force-pushed the return-not-found-blk-store branch from 639d0bb to 61dbd46 Compare March 9, 2026 09:50
Currently, the committer sends NotFound grpc error code for block APIs
by parsing the error message. As this is fragile, this commit adds
ErrNotFound error so that the committer can use errors.Is().

Signed-off-by: Senthilnathan <cendhu@gmail.com>
@cendhu cendhu force-pushed the return-not-found-blk-store branch from 61dbd46 to e024a4e Compare March 9, 2026 10:03
@cendhu cendhu requested a review from liran-funaro March 9, 2026 10:15
Signed-off-by: Senthilnathan <cendhu@gmail.com>
@cendhu cendhu merged commit 12a17e4 into hyperledger:main Mar 9, 2026
7 checks passed
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.

[block-store] return ErrNotFound instead of string error message

2 participants