Skip to content

New approach for the error handling - #846

Open
ineslamego wants to merge 4 commits into
developfrom
error-tile-new-approach
Open

New approach for the error handling#846
ineslamego wants to merge 4 commits into
developfrom
error-tile-new-approach

Conversation

@ineslamego

Copy link
Copy Markdown
Contributor

This pull request focuses on improving error handling and notification consistency across the application. The main changes include standardizing how error messages are displayed to users by trimming and formatting them, always showing a hint to check the browser console for details, and removing redundant local error state management from many components in favor of global notification methods. Additionally, the code now consistently extracts and displays only the first sentence of error messages in UI components, leading to a cleaner and more user-friendly experience.

Error handling and notification improvements:

  • Updated notify.permanentError and notify.temporaryError in notify.ts to trim and format error messages, and to always include a "Check browser console for details" description. (packages/core/src/notify.ts packages/core/src/notify.tsR36-R45)
  • In MetaportStore.ts, error headlines are now trimmed to the first sentence and capitalized before being sent to notifications. (packages/metaport/src/store/MetaportStore.ts packages/metaport/src/store/MetaportStore.tsR205)
  • UI error messages in ErrorMessage.tsx now only show the first sentence of the error, using a new extractFirstSentence helper. (packages/metaport/src/components/ErrorMessage.tsx [1] [2] [3]

Refactoring and code simplification:

These changes make error reporting more consistent and reduce code duplication by centralizing error handling logic.

@ineslamego ineslamego self-assigned this Apr 29, 2026
@vercel

vercel Bot commented Apr 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
portal Ready Ready Preview, Comment May 4, 2026 3:38pm
portal-base Ready Ready Preview, Comment May 4, 2026 3:38pm
portal-qa Ready Ready Preview, Comment May 4, 2026 3:38pm

Request Review

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.

Fix bug with error occurred on staking page

1 participant