core icon indicating copy to clipboard operation
core copied to clipboard

[json-rpc-engine] Fix any types in catch blocks, refactor

Open MajorLift opened this issue 1 year ago • 0 comments

Explanation

  • Fixes all any usage in the JsonRpcEngine class.
  • Errors are typed consistently as unknown to reflect actual usage in consumers and tests. - JsonRpcEngineCallbackError is no longer used within the package.

References

  • Closes #3720

Changelog

@metamask/json-rpc-engine

  • BREAKING: The error types used in JsonRpcEngineReturnHandler, JsonRpcEngineNextCallback, and JsonRpcEngineEndCallback are widened from JsonRpcEngineCallbackError to unknown.

Checklist

  • [x] I've updated the test suite for new or updated code as appropriate
  • [x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • [x] I've highlighted breaking changes using the "BREAKING" category above as appropriate

MajorLift avatar Feb 07 '24 21:02 MajorLift