I have an endpoint GET home/{homeId}/laptops . Its response is :
{"homeId":string,"laptops":string[]}
If homeID does not exist I can return '404 Not found' OR an empty response with the homeId and the laptops array empty such as :
{"homeId":'homesIdentifier',"laptops":[]}
The client does not really care about the error message and in my specific scenario I can query a database by homeId and retrieve the home's laptops so I do not really care if homeId exists because if homeId is not valid nothing will be returned from the database .
Also checking each time if homeId is valid will increase the endpoints cost .
So the question is : are there any http standards that advice what should I do ? Intuitively I would prefer a strict api telling you exactly what is going wrong , however I see an increase in cost here mainly for the sake of convenience ?
Note: I do not care about authorization in this scenario .