Skip to main content

Power BI

New

Differentiate error for OData 4.02 behavior: "We expected a property ‘...’, but the OData service omitted it from the response data."

Vote (1) Share
Guido Leenders's profile image

Guido Leenders on 18 Jan 2022 12:09:10

The error at the end can be returned when occur when the OData server leaves out the value assignment of null to fields defined in the metadata.


However, starting OData 4.02, the same error can also occur when the OData.Feed specifies that the server may leave out null values using "ODataOmitValues"


Error:


We expected a property ‘Document’, but the OData service omitted it from the response data.
This can occur for a number of reasons and does not necessarily imply that the data does not exist or is of a default value.
Comments (2)
Guido Leenders's profile image Profile Picture

Guido Leenders on 18 Jan 2022 12:13:45

RE: Differentiate error for OData 4.02 behavior: "We expected a property ‘...’, but the OData service omitted it from the response data."

The suggestion is to split this error in two errors in Power BI:When omit values is not used, the error remains the same.When omit values is used, use a different error, such as:The property ‘Document’ has no values in the response data. Omit null values has been requested, but the OData server must confirm skipping them using the preferences-applied HTTP header.

Either the property value is missing for some reason, or the OData server forgets to set the preferences-applied HTTP header.

Guido Leenders's profile image Profile Picture

Guido Leenders on 18 Jan 2022 12:10:01

RE: Differentiate error for OData 4.02 behavior: "We expected a property ‘...’, but the OData service omitted it from the response data."

For more background see:https://github.com/microsoft/DataConnectors/issues/360#issuecomment-1015339087https://forums.invantive.com/t/we-expected-a-property-document-but-the-odata-service-omitted-it-from-the-response-data-this-can-occur-for-a-number-of-reasons-and-does-not-necessarily-imply-that-the-data-does-not-exist-or-is-of-a-default-value/2062/3 (Dutch)