Skip to content

fix(example): report a navigation the router rejects instead of crashing - #219

Merged
glennawatson merged 1 commit into
mainfrom
fix/example-navigation-errors
Sep 29, 2026
Merged

glennawatson merged 1 commit into
mainfrom
fix/example-navigation-errors

Conversation

@glennawatson

Copy link
Copy Markdown
Contributor

Summary

The example shell reports a navigation the router rejects instead of crashing.

  • The shell observes ThrownExceptions on the router's Navigate, NavigateAndReset and NavigateBack commands and shows the error as the navigation status.

Why

A router command that fails reports the error to the caller and through its ThrownExceptions. Nothing observed ThrownExceptions, so ReactiveUI's default handler received the error and threw, and the shell's own error handler never ran.

Breaking changes

None. The change is in the example app.

How this was verified

Tests cover a rejected navigation, which reports its error as the status, and each page command.

Notes for the reviewer

The test drains the UI thread before disposing the shell: a command reports its error on the output scheduler, and the shell has to still be observing then.

Checklist

  • I have read the Contribute guide
  • The PR title follows Conventional Commits
  • Tests cover this change, or the summary says why they do not
  • New or changed public API has XML documentation

@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Sep 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.31%. Comparing base (15649e3) to head (0509e1a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #219      +/-   ##
==========================================
+ Coverage   98.21%   98.31%   +0.10%     
==========================================
  Files          51       51              
  Lines        1007     1010       +3     
  Branches      110      110              
==========================================
+ Hits          989      993       +4     
+ Misses         14       13       -1     
  Partials        4        4              

☔ View full report in Codecov by Harness.
📢 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.

@glennawatson
glennawatson merged commit 0c7c656 into main Sep 29, 2026
16 checks passed
@glennawatson
glennawatson deleted the fix/example-navigation-errors branch September 29, 2026 02:59
@github-actions

Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant