Skip to content

When a background SDK task fails, react in the client#6166

Merged
jmartinesp merged 1 commit intodevelopfrom
feat/add-client-session-delegate-background-task-error-callback
Feb 10, 2026
Merged

When a background SDK task fails, react in the client#6166
jmartinesp merged 1 commit intodevelopfrom
feat/add-client-session-delegate-background-task-error-callback

Conversation

@jmartinesp
Copy link
Member

Content

Implement RustClientSessionDelegate.onBackgroundTaskErrorReport:

  • For initialization issues or errors, we just print and report them.
  • For panics (unrecoverable errors) we also crash the app.

Motivation and context

React to issues in the SDK, parity with iOS.

Tests

You can't really test it unless you trigger one of those issues or modify the code to manually fail.

Tested devices

  • Physical
  • Emulator
  • OS version(s): 16

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

- For initialization issues or errors, we just print and report them.
- For panics (unrecoverable errors) we also crash the app.
@jmartinesp jmartinesp requested a review from a team as a code owner February 10, 2026 10:24
@jmartinesp jmartinesp requested review from bmarty and removed request for a team February 10, 2026 10:24
@jmartinesp jmartinesp added the PR-Feature For a new feature label Feb 10, 2026
@sonarqubecloud
Copy link

@github-actions
Copy link
Contributor

📱 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/7y9FWn

@codecov
Copy link

codecov bot commented Feb 10, 2026

Codecov Report

❌ Patch coverage is 96.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 81.37%. Comparing base (6c046fc) to head (fe9c43d).
⚠️ Report is 19 commits behind head on develop.

Files with missing lines Patch % Lines
...braries/matrix/impl/core/SdkBackgroundTaskError.kt 91.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #6166   +/-   ##
========================================
  Coverage    81.37%   81.37%           
========================================
  Files         2569     2570    +1     
  Lines        69700    69723   +23     
  Branches      8963     8968    +5     
========================================
+ Hits         56715    56739   +24     
+ Misses        9650     9649    -1     
  Partials      3335     3335           

☔ 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

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@jmartinesp jmartinesp merged commit 5b5224e into develop Feb 10, 2026
36 of 37 checks passed
@jmartinesp jmartinesp deleted the feat/add-client-session-delegate-background-task-error-callback branch February 10, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-Feature For a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants