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 TypeError thrown for certain OC list type results #196

Merged
merged 3 commits into from
Sep 20, 2021
Merged

Conversation

michaelnchin
Copy link
Member

Issue #, if available: N/A

Description of changes:

  • Implement additional checks to catch TypeError being thrown when attempting to create a visualization network from an invalid openCypher list-type results set.
  • Fix some issues in openCypher integration tests

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor

@krlawrence krlawrence left a comment

Choose a reason for hiding this comment

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

Looks good. Is try catch all we can do for this case?

@michaelnchin
Copy link
Member Author

The current OC network vertex/edge validity check assumes that any individual result passed in can only be of dict / list / other iterable type.

We now know non-iterable types results (e.g. int) may also be passed in as results, and that these cannot be valid network elements regardless.

So, having a broad try/catch clause to cover the rest of these possible invalid result types feels like the most straightforward way to deal with the issue.

@michaelnchin michaelnchin merged commit 7e8677e into main Sep 20, 2021
@michaelnchin michaelnchin deleted the OC-List-Fix branch September 20, 2021 09:45
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.

2 participants