Whilst designing a framework to synchronize objects (entity models) between Magento2 and our CRM, I have found that Magento's REST API will return a StatusCode of 404 with the following JSON
{No such entity with %fieldName = %fieldValue}
{[parameters, {
"fieldName": "customerId",
"fieldValue": 30
}]}
-when trying to GET a customer, but this happens with any non-searchcriteria required GET call.
IMO, 404 should be a route not found, an honest 404. Entity not found should be a 204 (Content not found), or at the very least a 200 with the JSON that it returns.
Am I doing it wrong? Is it really supposed to return a 404 error, and I have to build my .net framework "improperly" to accomodate for this?