Skip to content

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

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

Merged
merged 16 commits into from
Mar 11, 2025

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 ready!

Name Link
🔨 Latest commit 0b21bd4
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/67cfefee84128100082274fd
😎 Deploy Preview https://deploy-preview-7167--label-studio-docs-new-theme.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Mar 5, 2025

Deploy Preview for heartex-docs ready!

Name Link
🔨 Latest commit 0b21bd4
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/67cfefee2eb90a00084d5055
😎 Deploy Preview https://deploy-preview-7167--heartex-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@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 (2a22930).
Report is 14 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

@AndrejOros
Copy link
Contributor

AndrejOros commented Mar 11, 2025

/fm sync

Workflow run

@bmartel bmartel merged commit f870a50 into develop Mar 11, 2025
36 checks passed
robot-ci-heartex added a commit that referenced this pull request Mar 12, 2025
…ast messages in favour of modals with increased Sentry reporting (#7167)

Co-authored-by: robot-ci-heartex <[email protected]>
matt-bernstein pushed a commit that referenced this pull request Mar 12, 2025
…ast messages in favour of modals with increased Sentry reporting (#7167)

Co-authored-by: robot-ci-heartex <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants