3 ms·
> Be descriptive in your error responses > Assume a human will read them Yes, but... on the flip-side, make sure there's also some sort of code that the machi
by sverhagen 3y ago
> Be descriptive in your error responses
> Assume a human will read them
Yes, but... on the flip-side, make sure there's also some sort of code that the machines can read. Depending on the framework you started with, one or the other may be the more-obvious one to default to. But if you don't have both, you either have humans looking at cryptic codes (the point the article was making) or you have machines parsing through human-readable error messages with the risk of breaking backward-compatibility if you try to fix a typo in an error message or later decide to reword it or include more pointers.