Closed khmarbaise closed 3 years ago
Search criteria filter items - if remaining list of filtered items it is an empty result, not an error - just my opinion
Added a json msg like { "info":"No package found" } Will close this issue as soon as the code will be in production
Hallo @khmarbaise looks like your proposal has been implemented. I'm not a client side JavaScript expert. Did you have any idea in mind how to use the new API properly? Now my client code looks like this 🙀:
if (Array.isArray(response.data)) {
this.packages = response.data;
} else {
this.packages = [];
}
Hi, I think this issue has been resolved long time ago and with the v2.0 API there is a proper machine readable schema for situations with and without result items.
So I think this issues can be closed as fixed. In general as a API user it would be very valuable if the issues' status here would reflect the current status of the API.
I agree, sorry for being a bit lazy...
In cases if combinations of search criterias which would result in an empty result I think it should result into an error code instead of an empty json array.