Closed fmalcher closed 7 years ago
@fmalcher Since yesterday every ressource which normally returns an array, will return a 204 statuscode if nothing is found. Should I change this everywhere? Or just for transfers and transactions?
Good question... can we find out what the best practice is?
Empty array with status 200 would be great for me in the frontend. Otherwise I need to check for null
and create an empty array then.
Both ways work but havong this done in the backend would be a bit smarter.
Depends a bit of whether the empty result is intended or not. For transfers and transactions this is indeed intended, because it's possible (and wanted) that there are no transfers or transaction for an event.
However, in order to be consistent, I suggest using 200 + []
everywhere.
Also see this thread for the same discussion: https://groups.google.com/forum/#!topic/api-craft/wngl_ZKONyk
200 + [] is now used everywhere.
For transfers and transactions an empty array would be much better than nothing and 204. if you go along with that, here's your TODO 😃 @rweisse