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

{"error":{"code":"","message":"Value cannot be null.\r\nParameter name: source"}} #369

Open
eltoroit opened this issue Jun 7, 2024 · 2 comments · May be fixed by OData/ODataSamples#223
Assignees
Labels

Comments

@eltoroit
Copy link

eltoroit commented Jun 7, 2024

I am trying to use the reference service https://services.odata.org/TripPinRESTierService form Salesforce, and the Airlines and Airports works well. But when I try to access the Person Object, I get this error:

{"error":{"code":"","message":"Value cannot be null.\r\nParameter name: source"}}

This is the query that is being made.

https://services.odata.org/TripPinRESTierService/(S(y5p3g0acttyshhhmucgq5fvb))/People?$filter=UserName eq 'angelhuffman'&$count=true&$select=AddressInfo,Age,Emails,FavoriteFeature,Features,FirstName,Gender,HomeAddress,LastName,MiddleName,UserName

I am assuming the primary key of that object is the Username.

@marabooy marabooy self-assigned this Jul 9, 2024
@marabooy marabooy added the bug label Jul 9, 2024
@mikepizzo
Copy link
Member

mikepizzo commented Jul 10, 2024

This error occurs because the Features property for angelhuffman is not initialized in the data, so it is null which is not allowed for a collection-valued property.

A simpler repo would be: /People?$select=Features

@mikepizzo
Copy link
Member

Fixed by OData/ODataSamples#223. Just needs to be deployed to services.odata.org.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants