Skip to content

fix(accessControl): propagate error details instead of returning null#30

Open
laciferin2024 wants to merge 1 commit intolighthouse-web3:mainfrom
ideo-org:fix/issue-28-error-handling
Open

fix(accessControl): propagate error details instead of returning null#30
laciferin2024 wants to merge 1 commit intolighthouse-web3:mainfrom
ideo-org:fix/issue-28-error-handling

Conversation

@laciferin2024
Copy link

Fixes #28

Summary

This patch updates access control error propagation so failed node responses include returned error details instead of always returning error: null.

Changes

  • Updated src/methods/accessControl/index.ts to return collected node errors when isSuccess is false.
  • Left the existing outer catch behavior unchanged to keep scope tight.

Validation

  • npm run build
  • npm test

Note

@ravish1729

  • Since we can't discount the possibility of 1+ node responding with errors , should we consider adding :
    - errors to the api response schema: to pass down all the errors.

This would give us early indicators of eminent dangers like the 2013 chain fork of Bitcoin where older miners failed to process newer blocks even though the consensus was valid.

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.

Incorrect error handling in accessControl function

1 participant