Comments (5)
Hi @johnwc. This is not an issue that should require a change to the library since it's not a bug in the implementation or a scenario that cuts across users of the library. Our advice is for you to create a custom ODataPayloadValueConverter
that implements the behaviour you want and inject it into the DI container. See similar advise provided for a related case - #2464 (comment)
from odata.net.
@gathogojr i thought of doing that first, until I noticed there was no way to know what the details of the property is from that method. It only gets passed the raw value and its expected type. How do you suggest I throw an error inside my custom class with the name of the property?
Also, a lot of times things are not done because it only effects the library, sometimes things are done to help the developers and end users of the library. This is a perfect example of such that, it helps the end user know what is wrong and where it is.
from odata.net.
@johnwc I understand. We triaged this issue earlier today and came to the same conclusion as you have. A custom payload value converter won't make it possible to report the property that has an invalid value.
We'd be open to a pull request contribution if you're in a position to do that. Luckily we can introduce the change in ODataPayloadValueConverter
with minimal/no risk of breaking other customers.
from odata.net.
@gathogojr Are you good with the changes I documented above?
from odata.net.
The suggestion looks okay. If you can publish a pull request then we can review. Add tests to verify the changes.
from odata.net.
Related Issues (20)
- ODataException is thrown when getting a worksheet range via Microsoft.Graph API HOT 7
- Nav prop on complex type returned from a collection
- Mitigate ArgumentOutOfRangeException when the typename in context URL is not fully qualified HOT 2
- Querying by primary key throws exception if element doesn't exist HOT 1
- EdmLib successfully parses type names with unbalanced parens HOT 1
- Remove `IContainerProvider` and pass the `IServiceProvider` directly to the message reader or writer HOT 4
- Remove `ODataMessageInfo` from the DI container
- ODL 8 breaking changes tracking
- re: CustomUriFunctions should not be static or irreversible
- Filter on nullable DateOnly seems not supported HOT 2
- Set license expression on nuget packages
- ODataException is thrown when getting a worksheet table rows via Microsoft.Graph API HOT 2
- Exception thrown when trying to create EdmTargetPath from string path that contains type casts HOT 1
- WritesJsonElementCorrectly() test fails Intermittently in the release pipeline HOT 2
- Scale facet value has wrong scaling
- Unhandled Exception: System.TypeInitializationException: The type initializer for 'Microsoft.OData.Edm.Vocabularies.V1.CoreVocabularyModel' threw an exception. ---> System.BadImageFormatException: Could not load file or assembly 'System.Reflection, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context. (Exception from HRESULT: 0x80131058) ---> System.BadImageFormatException: Cannot load a reference assembly for execution.
- NullReference exception generated when using FilterClause.ApplyTo method with open properties in the filter query
- Microsoft.OData.Cli 0.3.0 enable-tracking no longer working
- Client - inefficient query generated from projection with only expansion HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from odata.net.