Skip to content

Conversation

@zeusongit
Copy link
Contributor

Purpose

The crash was thrown with ThrowNoMatchException from the linq statement. First() was used at multiple places, which is now replaced with FirstOrDefault() which instead of throwing an exception will return the default value.

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated
  • This PR contains no files larger than 50 MB

Release Notes

Handle crash by using FirstOrDefault() instead of First()

Reviewers

@DynamoDS/dynamo

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-8095

@zeusongit zeusongit added this to the 3.5 milestone Mar 20, 2025
@zeusongit zeusongit requested a review from sm6srw March 20, 2025 20:41
Copy link
Contributor

@aparajit-pratap aparajit-pratap left a comment

Choose a reason for hiding this comment

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

Can we add a test?

@zeusongit
Copy link
Contributor Author

Can we add a test?

We already had some test for this, I added to it.

@zeusongit zeusongit merged commit a2600de into DynamoDS:master Mar 21, 2025
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.

3 participants