1

I read somewhere, that there is a possibility to log errors that happen, before your controller code gets executed. For example, if the parsing of a json post object fails, I would like to get some messages, so i know, where i can start fixing problems. Somebody said, it would be an option in Visual Studio, but i just can´t seem to find this post again.

For example, if i post a:

{
   "name":"bob"
   "lastName":"meier"
}

I would really like to get a output log like "Not able to parse json, because you missed a comma between the two attributes" or at least some kind of error message, so i know where to look. I just ran into this missed comma some times now and could never decide, if it was a wrong url, wrong DI or something entirely different, as the service just returns a 500, if something unexpected happens.

Does anybody has an idea how i could achieve this?

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.