New approach for the error handling - #846
Open
ineslamego wants to merge 4 commits into
Open
Conversation
ineslamego
marked this pull request as ready for review
May 4, 2026 16:58
ineslamego
requested review from
DmytroNazarenko,
dmytrotkk and
yavrsky
as code owners
May 4, 2026 16:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
notify.permanentErrorandnotify.temporaryErrorinnotify.tsto trim and format error messages, and to always include a "Check browser console for details" description. (packages/core/src/notify.tspackages/core/src/notify.tsR36-R45)MetaportStore.ts, error headlines are now trimmed to the first sentence and capitalized before being sent to notifications. (packages/metaport/src/store/MetaportStore.tspackages/metaport/src/store/MetaportStore.tsR205)ErrorMessage.tsxnow only show the first sentence of the error, using a newextractFirstSentencehelper. (packages/metaport/src/components/ErrorMessage.tsx[1] [2] [3]Refactoring and code simplification:
errorMsgandsetErrorMsg) from multiple components (MonthSelector,Paymaster,Topup,ChainCreditsTile,CreditStationStatusTile,CreditsPaymentTile,TokenAdminTile,TokensAdmin), relying instead on global notification methods for error reporting. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28]These changes make error reporting more consistent and reduce code duplication by centralizing error handling logic.