All Questions
Tagged with web-api exceptions
3 questions
0
votes
1
answer
118
views
Return response from controller or raise exception from service
I need some guidance on how to send error responses to client from WebAPI controller for an update operation. I need to check if data is changed and if it has duplicate data. I have service class that ...
6
votes
2
answers
7k
views
Best practice to handle POST with array of objects if at least one object raise an Exception
I want to POST an array of objects and make an insertion in database concerning each of them.
What is the best practice if one object does not conform and raise an Exception? (cancel all transactions ...
1
vote
2
answers
664
views
Should I Aggregate Web API Errors?
The Situation
We are writing a REST API that performs validation up-front.
The code is written such that it tries to find as many errors as possible.
However, each error might correspond to a ...