Skip to content

fix(errors): accept unknown parameter type in parseTxError to safely handle null, string, and custom error objects - #28

Open
yappermoar-boop wants to merge 1 commit into
circlefin:masterfrom
yappermoar-boop:fix-parse-tx-error-unknown-type-safety
Open

fix(errors): accept unknown parameter type in parseTxError to safely handle null, string, and custom error objects#28
yappermoar-boop wants to merge 1 commit into
circlefin:masterfrom
yappermoar-boop:fix-parse-tx-error-unknown-type-safety

Conversation

@yappermoar-boop

Copy link
Copy Markdown

Updated parseTxError signature in lib/errors.ts from error: Error to error: unknown and added type-safe checks for null, undefined, raw strings, and custom RPC error objects ({ message: string }). Previously, passing null, undefined, or string errors caught in try...catch blocks caused TypeError: Cannot read property 'message' of null.

…handle null, string, and custom error objects
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.

1 participant