Best approach for returning found and not found in a single response

Viewed 18

I have a controller, which is accepting a list of Ids as query string (csv).

I am splitting the string , creating an array and then loop through each item.

For each item, I am making a service call and if found adding them to response list.

Now, the issue with this approach, if user has passed an id , which is not present , then there are no indication to user.

I can go ahead and write some code when item is null.

What I am intrested to know , now do we handle this from a frame work level.

Its not a 404 or 206, but a 200 with few possible 204.

Just wanted to know how to handle this use case.

0 Answers
Related