Rob Elliot
11/28/2025, 12:15 PMval clientError by lazy { CLIENT_ERROR.contains(code) || clientGenerated }
completely failed the principle of least surprise for me.
I was blindsided by the idea that Status.clientError can be true for a 5xx. I think it mixes two quite separate concerns: indicating where the status comes from, and indicating what the requester can do about it. The point of something being a clientError, a 4xx, is that there's no point repeating the same request without a change in server side state.
I'd much prefer the clientGenerated property to be public and clientError just to be CLIENT_ERROR.contains(code).