Skip to content

Conversation

@jmartinesp
Copy link
Member

@jmartinesp jmartinesp commented Oct 8, 2025

This way, we can customise the error to display (throwable.message, throwable.localizeMessage, or any other error message we want).

Content

Motivation and context

Fixes #5483

Screenshots / GIFs

Tests

  • Step 1
  • Step 2
  • Step ...

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • Changes have been tested on an Android device or Android emulator with API 24
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • You've made a self review of your PR

This way, we can customise the error to display (`throwable.message`, `throwable.localizeMessage`, or any other error message we want).
…` to this to display a generic error instead of the technical one coming from Rust
@github-actions
Copy link
Contributor

github-actions bot commented Oct 8, 2025

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/7QStVg

@jmartinesp jmartinesp changed the title Modify AsyncFailure so it takes String? instead of a Throwable? Display non-technical error on media gallery Oct 8, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 8, 2025

@codecov
Copy link

codecov bot commented Oct 8, 2025

Codecov Report

❌ Patch coverage is 57.89474% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.93%. Comparing base (4c358ae) to head (6ed35b0).
⚠️ Report is 13 commits behind head on develop.

Files with missing lines Patch % Lines
.../mediaviewer/impl/gallery/MediaGalleryPresenter.kt 0.00% 1 Missing and 1 partial ⚠️
...aries/mediaviewer/impl/gallery/MediaGalleryView.kt 50.00% 0 Missing and 2 partials ⚠️
...es/mediaviewer/impl/viewer/MediaViewerPresenter.kt 0.00% 1 Missing and 1 partial ⚠️
...ies/mediaviewer/impl/gallery/MediaGalleryEvents.kt 0.00% 1 Missing ⚠️
...aries/mediaviewer/impl/viewer/MediaViewerEvents.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5487      +/-   ##
===========================================
- Coverage    81.93%   81.93%   -0.01%     
===========================================
  Files         2371     2371              
  Lines        67207    67215       +8     
  Branches      8112     8115       +3     
===========================================
+ Hits         55069    55071       +2     
- Misses        9163     9167       +4     
- Partials      2975     2977       +2     

☔ 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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Note this Failed to load media message comes from a fake Exception(message = "Failed to load media"). This is not localized and in a real example can expose internal state of the app.

Copy link
Member

@ganfra ganfra Oct 9, 2025

Choose a reason for hiding this comment

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

I don't think we should ever use the message exception anyway :/
We probably need some clean up on the error ui through the entire app, which might require some design/product.

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.

The media viewer can display technical error

4 participants