Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TTL parsing when driver configured to use JS numbers #425

Merged
merged 1 commit into from
Nov 1, 2018

Conversation

lutovich
Copy link
Contributor

@lutovich lutovich commented Nov 1, 2018

Driver can be created with {disableLosslessIntegers: true} config. Then all integer numbers returned in query results will be Number instead of neo4j.Integer.

Routing table response parsing code did not expect Numbers and failed to parse the TTL entry. This PR fixes parsing by always wrapping returned value of TTL in a neo4j.Integer.

Also improved error messages around routing response parsing to include the original error message.

Fixes #424

Driver can be created with `{disableLosslessIntegers: true}` config.
Then all integer numbers returned in query results will be `Number`
instead of `neo4j.Integer`.

Routing table response parsing code did not expect `Number`s and failed
to parse the TTL entry. This commit fixes parsing by always wrapping
returned value of TTL in a `neo4j.Integer`.

Also improved error messages around routing response parsing to include
the original error message.
@lutovich lutovich requested a review from ali-ince November 1, 2018 11:59
Copy link
Contributor

@ali-ince ali-ince left a comment

Choose a reason for hiding this comment

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

LGTM.

@lutovich lutovich merged commit c75c1e8 into neo4j:1.7 Nov 1, 2018
@lutovich lutovich deleted the 1.7-js-numbers-ttl branch November 1, 2018 13:18
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.

Causal Cluster Unable To Parse TTL Entry From Router
2 participants