Skip to content

issue/909 - Restore cardinality error message verbosity#910

Merged
mariusconjeaud merged 3 commits intoneo4j-contrib:rc/6.0.0from
billycalladine:issue/909
Oct 13, 2025
Merged

issue/909 - Restore cardinality error message verbosity#910
mariusconjeaud merged 3 commits intoneo4j-contrib:rc/6.0.0from
billycalladine:issue/909

Conversation

@billycalladine
Copy link
Copy Markdown
Contributor

@billycalladine billycalladine commented Oct 6, 2025

Context

PR #897 simplified error messages, losing critical debugging info (direction, node ID, class name).

Before (v5.5.x)

Node already has zero or one relationship in a outgoing direction of type TEST_REL on node (4:1bc18457-505a-4fac-93f3-3e1d00c97cdb:805245) of class 'Node2' can't connect more

After (v5.6.x)

Node already has one relationship of type TEST_REL. Use reconnect() to replace the existing relationship.

The fix

Use str(self) in cardinality violation messages to preserve detailed relationship manager description.

Now returns

Node already has zero or one relationship in a outgoing direction of type TEST_REL on node (4:bf255601-24cf-443d-8bee-45427fc61eb2:4) of class 'Node2'. Use reconnect() to replace the existing relationship.

Changes

Impact

@billycalladine billycalladine changed the title issue/909 - improve error message verbosity issue/909 - Restore cardinality error message verbosity Oct 6, 2025
@mariusconjeaud mariusconjeaud changed the base branch from master to rc/6.0.0 October 7, 2025 09:17
@mariusconjeaud
Copy link
Copy Markdown
Collaborator

Thank you for this ! I tried to unify the error messages, and maybe was a bit too extreme. :-)

Setting it for the rc 6.0 branch because I hope it's the next release ; will change if relevant.

@mariusconjeaud
Copy link
Copy Markdown
Collaborator

Merge conflicts fixed

@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.85%. Comparing base (afb8fdf) to head (17ab4d8).
⚠️ Report is 14 commits behind head on rc/6.0.0.

Additional details and impacted files
@@             Coverage Diff              @@
##           rc/6.0.0     #910      +/-   ##
============================================
- Coverage     87.89%   87.85%   -0.05%     
============================================
  Files            36       36              
  Lines          6165     6224      +59     
============================================
+ Hits           5419     5468      +49     
- Misses          746      756      +10     

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

@mariusconjeaud mariusconjeaud merged commit 2cc624b into neo4j-contrib:rc/6.0.0 Oct 13, 2025
23 of 24 checks passed
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.

Cardinality error messages lose detailed node info after RelationshipFrom fix

2 participants