@jahirsheikh8 Wrong examples that cannot be compared.
First representing subcategories/subpages of user entity.
Second representing filtering by user type.
Different purposes, different logic of what will be returned.
@SumitM_X Everything that non 2xx means that request cannot be processed using non success flow. 404 on such response means that resource “/orders?userId=123” doesn’t exist & server cannot process it. For empty data you can:
- return 200 with empty array
- return 204
@AntonMartyniuk Main problem that developers often don’t know how to qualify the problem. They think it’s a common problem, but in reality - it isn’t. Most valuable skills for developer are: understand business needs, understand scalability points, develop architecture.
@SumitM_X Firstly too many rows with this status. Secondly it’s a bad index in any aspects, cause has low cardinality. You should limit query, use partial index with status & creation date for example, use pagination techniques.
@e_opore Monolith will become a pain when your CI & deploy will take several hours & business want some hotfixes for now. And then you start thinking about separating into services.