Skip to content

Conversation

@orty
Copy link

@orty orty commented Dec 1, 2023

No description provided.

Copy link
Member

@BlaiseD BlaiseD left a comment

Choose a reason for hiding this comment

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

A test here would help persist the change.

}
else
{
if (parent.Type != parts[i].ParentType)
Copy link
Member

Choose a reason for hiding this comment

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

I think we want to throw an exception here if parent.Type is not assignable form parts[i].ParentType ?

Copy link
Author

Choose a reason for hiding this comment

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

I assumed that OData would take care of this check beforehand, and there was no tests for the validity of getting the parts[i].MemberName member out of the parent.Type type (which caused my issue btw).

Both of these errors return perfectly readable and troubleshootable error messages so.. What do you think ?

Copy link
Member

Choose a reason for hiding this comment

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

Just FYI this library does not assume an OData caller. Not a huge deal. A unique message makes it easier to pinpoint even throw new InvalidOperationException("{EFF2398E-8BA7-4A52-A098-AEDF6280F790}"); is helpful.

@orty
Copy link
Author

orty commented Dec 2, 2023

A test here would help persist the change.

I will implement the tests (both repos)

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