We currently have an API that is following a less than ideal process, however due to business need cannot be deprecated or changed at this time. As such, I'd like to update the HTTP status code to more accurately reflect the error and I can't settle on one that makes sense for the scenario.
The endpoint is a GET and returns an array of entities. The ID for each entity is supposed to be a GUID string, however due to some faulty conversion data in the backend system there are integer IDs mixed in for certain requests. The API currently validates these IDs and sends a 500 response with no data if the IDs are not all GUIDs. We've had issues where our devs have been confused by the 500 so I'd like to find a more explicit response.
422 Unprocessable Entity kind of makes sense to me but based on RFC 4918 it looks to be more for formatting of the response.
If we did return only the GUID IDs I could see sending a 206 Partial.
Thoughts?