Skip to content

Type the server's NoLeaderException instead of a misspelled key - #310

Merged
poissoncorp merged 1 commit into
ravendb:v7.2from
poissoncorp:RDBC-noleader-mapping
Sep 17, 2026
Merged

poissoncorp merged 1 commit into
ravendb:v7.2from
poissoncorp:RDBC-noleader-mapping

Conversation

@poissoncorp

Copy link
Copy Markdown
Contributor

The server sends NoLeaderException. The map was keyed on NoLoaderException, a name the server never sends, so a real no-leader failure reached callers as a plain RavenException.

schema.type = "Raven.Client.Exceptions.Cluster.NoLeaderException"
ExceptionDispatcher.get(schema, 500)
# before: RavenException
# after:  NoLeaderException

The class is renamed to match, with the old name kept as an alias so existing imports and except clauses keep working:

NoLoaderException = NoLeaderException

Three tests in ravendb/tests/issue_tests/test_exception_dispatcher.py, no server needed.

Found while syncing the test driver with C#, where teardown has to swallow a no-leader failure and could not catch it by type.

The map was keyed on NoLoaderException, which the server never sends, so a real no-leader failure reached callers as a plain RavenException. The old name stays importable as an alias.
@poissoncorp
poissoncorp merged commit cbb2b4e into ravendb:v7.2 Sep 17, 2026
5 checks passed
@poissoncorp poissoncorp mentioned this pull request Sep 17, 2026
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.

1 participant