Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: OPTIC-1746: Improve global error message handling by showing toast messages in favour of modals with increased Sentry reporting #7167

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

bmartel
Copy link
Contributor

@bmartel bmartel commented Mar 5, 2025

This PR was automatically generated via Follow Merge. Workflow Run
Please ensure that all linked upstream Pull Requests are merged before proceeding with this one.

This pull request introduces several changes to streamline error handling and improve the user experience by integrating toast notifications across various components as a replacement of a modal message. There are also improvements to Sentry error tracking of non actionable errors which will no longer be shown to the user through updates to the API provider to handle global error messages more effectively.

UI Enhancements:

  • Added ToastProvider and ToastViewport components to App.jsx, Form.jsx, and Modal.jsx to enable toast notifications which provide a less intrusive way of communicating failures over the previous default of a Modal message. [1] [2] [3] [4] [5] [6] [7]

Error Handling Improvements:

  • Enhanced Sentry integration by adding environment-specific configurations and new methods captureMessage and captureException for better error tracking.
  • Updated ApiProvider to support improved global error messages, including the use of toast notifications for 4xx errors and enhanced error logging to Sentry for non-4xx errors. [1] [2] [3] [4] [5]

Testing

  • TBD

Feature Flags:

  • Introduced a new feature flag fflag_feat_front_optic_1746_improve_global_error_messages_short to control the rollout of these changes.

bmartel added 2 commits March 4, 2025 11:30
…ast messages in favour of modals and increased Sentry reporting
Copy link

netlify bot commented Mar 5, 2025

Deploy Preview for label-studio-docs-new-theme canceled.

Name Link
🔨 Latest commit 94e8efd
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/67caa50c99068d000891fb69

Copy link

netlify bot commented Mar 5, 2025

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit 94e8efd
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/67caa50c60423700085e3d1d

@bmartel bmartel changed the title Fb optic 1746 feat: OPTIC-1746: Improve global error message handling by showing toast messages in favour of modals and increased Sentry reporting Mar 5, 2025
@bmartel bmartel changed the title feat: OPTIC-1746: Improve global error message handling by showing toast messages in favour of modals and increased Sentry reporting feat: OPTIC-1746: Improve global error message handling by showing toast messages in favour of modals with increased Sentry reporting Mar 5, 2025
@bmartel bmartel requested a review from yyassi-heartex March 5, 2025 16:41
@AndrejOros
Copy link
Contributor

AndrejOros commented Mar 6, 2025

/fm sync

Workflow run

Copy link

codecov bot commented Mar 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.18%. Comparing base (4108f9e) to head (94e8efd).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7167      +/-   ##
===========================================
- Coverage    77.20%   77.18%   -0.03%     
===========================================
  Files          187      187              
  Lines        14484    14491       +7     
===========================================
+ Hits         11183    11185       +2     
- Misses        3301     3306       +5     
Flag Coverage Δ
pytests 77.18% <ø> (-0.03%) ⬇️

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.

@AndrejOros
Copy link
Contributor

AndrejOros commented Mar 7, 2025

/fm sync

Workflow run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants