Closed kenziebottoms closed 6 years ago
That's a super good question. I lean towards sending back a 404: File Not Found
error since the "file" at, say, /customers/3
isn't found. I don't have a strong opinion though. With using APIs in the past, what have you found to be standard when you make a request for a resource that isn't there?
If you search
/customers
and there are no customers, or go to/customers/3
and there is no customer with id 3, do we return an error object or just an empty array ([ ]
)?