Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

JsonInputFormatter doesn't log errors #3557

Closed
@tugberkugurlu

Description

@tugberkugurlu

I am on MVC 6.0.0-beta8 and I had a JSON deserialization failure. It didn't log any errors but instead it just didn't bind anything and populated the model state. This is the response I had:

51
{"startedAt":["The input was not valid."],"endedAt":["The input was not valid."]}
0

When I tried the same deserialization in isolation, I got the below error from JsonConvert.DeserializeObject<T>:

An unhandled exception of type 'NodaTime.Utility.InvalidNodaDataException' occurred in Newtonsoft.Json.dll

Additional information: Unexpected token parsing Instant. Expected String, got Date.

I would expect to see this as a Debug level log so that I wouldn't need to dig deep to see what is going wrong. Would be also useful to log more info along with the error like what is the value, etc.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions