In my single page web app, I use WebAPI to provide and save JSON data, which I display with knockout.
I have custom converter for my data too.
In case of invalid user input, my JsonConverter
throw an exception, unfortunately the WebAPI method call DOESN'T fail and the invalid input is, instead, turned to null value.
i.e. my JSON data { ID:1, Time='dwehjkhwejk' }
becomes (in C#) new Data { ID = 1, Time = null };
Instead, I would like the exception thrown in my converter to make the API call fail!
How can I do that?