51

Dear backend dev:
No data is not an error for fuck sake. Don't want 404, or messages if the search criteria filters out all values. Give me a empty array.
Is this hard to understand that we need a team meeting to discuss?
Godamit

Comments
  • 7
    Quite right.

    An empy array is the right response.
  • 0
  • 3
    I am returning an empty array - have you cleared your cache?
  • 4
    @kunashe
    Yes, and did the ancient rain dance too. Still the same. A reboot maybe?
  • 1
    @searchindex can you try again now?
  • 8
    If they really need a meeting for that, you better forget about it and keep the error pattern. Sure as hell they will put all the effort in trying to prove you that their way of developing is not only the best but it's THE only one. At some point they will start quoting the bible and the apocalypse and only then you will realize the sole and only truth: none is gonna give you back that hour of your life wasted hearing the zealots
  • 2
    I have to explain that to junior workmate here.... well fix myself because he doesnt listen

    Even do the tests because quoting him"I DONT TEST"
  • 4
    It is fine (even required) to return an empty list if requesting a list of items. But if you're requesting for a specific id however a 404 should be thrown if the id does not exist. Eg.

    /products should return a list
    /products/some-id should return a 404
  • 0
    What did the test say? 🤓
  • 0
    How about a status 500?
  • 0
    @cheke are you kidding?
  • 0
Add Comment