@llmDestructor@romxdev@tailwindcss Seemed like you were trying to refute that tailwind doesn't forces you to use components and then said to use shadcn? Perhaps I misunderstood what you meant?
@maxcallstack@SumitM_X Actually, I will refine my take on this. I can see the case for it being a 2xx. The server alone determines whether or not the resource exists as such it is completely free to treat it as an empty resource. Likewise it can also treat it as a nonexistent resource with a 404
@maxcallstack@SumitM_X Ask it about opacity of URIs, and ask it what it what it would return in the case of /widgets?userId=123 if there are no "widgets" in the application
@maxcallstack@SumitM_X According to your application, yes, but not according to the HTTP spec. URIs are completely opaque identifiers and carry no meaning at the HTTP-level
@maxcallstack@SumitM_X Yeah, so that standard fallback would be a 404 because that URL doesn't exist. It's the same case with /orders?userId=123.
URIs are opaque strings with no meaning according to the HTTP spec, so these two cases are the same.
@getifyX Presumably someone would take out a collateralized loan if they intend to spend that money, why not just tax it via sales tax? Would it make sense to tax a collateralized loan if you don't actually use that loan money?
@maxcallstack@SumitM_X You could argue, as I am, that if a user has no orders, then that /orders?userId=123 resource does not exist yet and thus the URL is not legit, hence the 404.
A different philosophy from yours, but certainly a valid one
@maxcallstack@SumitM_X 404 is useful here as it can be indicative of a misconfigured client. where did the client get the /orders?userId=123 URL from if there are no orders for that user?
@RajuKundena@SumitM_X There's no such concept as an "endpoint" in the HTTP spec or URI spec. Similarly there's no such concept of "collection".
URIs are completely opaque strings with no semantic meaning given depending on their structure.
404 with an app-specific body is the correct response here