Skip to content

[Flyout System] Improve validation and error logging#9091

Merged
tsullivan merged 1 commit intoelastic:feat/flyout-systemfrom
tsullivan:flyout-system/improve-error-logging
Oct 10, 2025
Merged

[Flyout System] Improve validation and error logging#9091
tsullivan merged 1 commit intoelastic:feat/flyout-systemfrom
tsullivan:flyout-system/improve-error-logging

Conversation

@tsullivan
Copy link
Copy Markdown
Member

@tsullivan tsullivan commented Oct 10, 2025

Summary

Why are we making this change?

This allows developers using the Flyout System to better understand why validation errors occur, and to be able to correlate the message to their code.

Screenshots #

Impact to users

No impact to end users. Use cases that would throw validation errors should be fixed before the code is released.

QA

Remove or strikethrough items that do not apply to your PR.

General checklist

  • Browser QA
    • Checked in both light and dark modes
    • Checked in both MacOS and Windows high contrast modes
    • Checked in mobile
    • Checked in Chrome, Safari, Edge, and Firefox
    • Checked for accessibility including keyboard-only and screenreader modes
  • Docs site QA
  • Code quality checklist
  • Release checklist
    • A changelog entry exists and is marked appropriately.
    • If applicable, added the breaking change issue label (and filled out the breaking change checklist)
  • Designer checklist
    • If applicable, file an issue to update EUI's Figma library with any corresponding UI changes. (This is an internal repo, if you are external to Elastic, ask a maintainer to submit this request)

@tsullivan tsullivan requested a review from a team as a code owner October 10, 2025 20:35
@tkajtoch tkajtoch self-requested a review October 10, 2025 20:54
@elasticmachine
Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

error: FlyoutValidationError
): string {
const prefix = `EuiFlyout validation error: `;
console.error(error);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

FYI We throw on console.error in test environment. We might need to adjust things if this affects other tests

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The test that consumes this file mocks console.error to avoid tests failing, but if other tests consume validation.ts and are hitting validation errors, they would be affected. Let me know if you think this would be an issue.

@elasticmachine
Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

Copy link
Copy Markdown
Member

@tkajtoch tkajtoch left a comment

Choose a reason for hiding this comment

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

LGTM

@tsullivan tsullivan merged commit 1e403fa into elastic:feat/flyout-system Oct 10, 2025
5 checks passed
@tsullivan tsullivan deleted the flyout-system/improve-error-logging branch October 10, 2025 21:38
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.

4 participants