Skip to content

Add structured error details extraction - #299

Open
Fryuni wants to merge 4 commits into
masterfrom
feat/extract-error-properties
Open

Add structured error details extraction#299
Fryuni wants to merge 4 commits into
masterfrom
feat/extract-error-properties

Conversation

@Fryuni

@Fryuni Fryuni commented Aug 13, 2026

Copy link
Copy Markdown
Member

Summary

Add a public helper for extracting structured, serializable details from unknown errors, including nested causes. Document its API and cover fallback and recursive behavior with focused tests.

Changes

  • Add ErrorDetails with message, optional stack, and recursive cause fields
  • Add extractErrorDetails with configurable fallback handling
  • Document the helper and its return type with JSDoc
  • Test string, unsupported, empty-message, stack, and nested-cause cases

Testing

  • npm test -- --runInBand test/utilities.test.ts — 26 tests passed
  • npm run validate
  • npm run lint

@Fryuni
Fryuni requested review from a team as code owners August 13, 2026 22:35
@github-actions

Copy link
Copy Markdown

👋 @Fryuni

Thanks for your contribution!

The approval and merge process is almost fully automated 🧙

Here's how it works:

  1. You open a new pull request
  2. Automated tests check the code
  3. Maintainers review the code
  4. Once approved, the PR is ready to merge.

👉 Omit the extended description
Please remove the commit body before merging the pull request.
Instead, include the pull request number in the title to provide the full context
about the change.

☝️ Lastly, the title for the commit will come from the pull request title. So please provide a descriptive title that summarizes the changes in 50 characters or less using the imperative mood.

Happy coding! 🎉

@Fryuni Fryuni added the feature New feature label Aug 13, 2026
@Fryuni Fryuni self-assigned this Aug 13, 2026
Comment thread src/utilities.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants