I want to give a custom response when Model binding to the API
fails by datatype mismatch.
Example: When someone tries to bind a string
to GUID
parameter in my API, currently I get following response.
{
"documentCategoryId": [
"Error converting value \"string\" to type 'System.Guid'. Path 'documentCategoryId', line 2, position 32."
]
}
Instead, I would like to say,
processing error