rbelavadi opened a new pull request, #6321:
URL: https://github.com/apache/texera/pull/6321
### What changes were proposed in this PR?
Adds `error.spec.ts` to cover `extractErrorMessage`, a previously untested
pure utility function in `common/util/` that normalizes errors of unknown shape
into a display-safe string. Covers all four behavior branches: a native `Error`
instance, an object with a string `error` key, an object with a nested `{
error: { message } }` shape, and fallback behavior for unrecognized shapes
(null, number, empty object, malformed error key).
No production code was changed.
### Any related issues, documentation, discussions?
Closes #6254
### How was this PR tested?
Added 7 new unit tests in error.spec.ts covering all branches described in
the issue. Ran locally via `npx ng test --include='**/error.spec.ts'`; all 7
pass.
### Was this PR authored or co-authored using generative AI tooling?
No.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]