In almost every kind of API there are integer error codes like (ex. 123
) which indicates error type. I was wondering if it wasn't better to use descriptive string codes like user_not_found
or invalid_request
. In my opinion they are much more practical: let's say you get back to your code after months or so and you can easily go through error handling parts without searching for error codes in documentation.
Why integer error codes still exists in APIs?