Skip to content

Fix [Object object] in script error display - #35476

Merged
sgress454 merged 1 commit into
mainfrom
sgress454/35432
Nov 11, 2025
Merged

Fix [Object object] in script error display#35476
sgress454 merged 1 commit into
mainfrom
sgress454/35432

Conversation

@sgress454

Copy link
Copy Markdown
Contributor

Related issue: Resolves #35432

Checklist for submitter

Testing

  • Added/updated automated tests
  • QA'd all new/changed functionality manually

For unreleased bug fixes in a release candidate, one of:

  • Confirmed that the fix is not expected to adversely impact load test results

@sgress454
sgress454 requested a review from a team as a code owner November 10, 2025 23:22
className={`${baseClass}__status-message`}
iconName="error-outline"
message={`Error: ${message}`}
message={<>Error: {message}</>}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since message can be a React element, concatenating it to a string results in [Object object]. Creating a wrapper React element allows us to add the Error: prefix safely whether message is a string or another React element (I tested w/ both).

@codecov

codecov Bot commented Nov 11, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.13%. Comparing base (63eb318) to head (5df6331).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main   #35476    +/-   ##
========================================
  Coverage   66.13%   66.13%            
========================================
  Files        2100     2100            
  Lines      177475   177475            
  Branches     7398     7298   -100     
========================================
  Hits       117371   117371            
  Misses      49343    49343            
  Partials    10761    10761            
Flag Coverage Δ
frontend 53.63% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sgress454
sgress454 merged commit 22fee0c into main Nov 11, 2025
16 of 17 checks passed
@sgress454
sgress454 deleted the sgress454/35432 branch November 11, 2025 14:41
sgress454 added a commit that referenced this pull request Nov 11, 2025
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #35432

# Checklist for submitter

## Testing

- [ ] Added/updated automated tests
- [X] QA'd all new/changed functionality manually

For unreleased bug fixes in a release candidate, one of:

- [X] Confirmed that the fix is not expected to adversely impact load
test results

(cherry picked from commit 22fee0c)
sgress454 added a commit that referenced this pull request Nov 11, 2025
…5488)

<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #35432

(cherry picked from commit 22fee0c)
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.

Script error message for timeout script appears as [object Object]

3 participants