Is it good practice to modify the reason phrase of an HTTP response?
<p>HTTP errors have standardized response strings associated to their numeric codes. E.g. 404 "Not Found" or 500 "Internal Server Error". From the RFC it is clear that these strings are not relevant for the recognition of the error (only the numeric code is), but fiddling with e.g. tornado it is clear that the reason is generated automatically from the error code, and the reason parameter in the HTTPError class is present (according to the docs) to use non-standard codes, meaning that you are generally not supposed to use it.</p>

<p>My question is: is it good practice to change the reason string to something more specific for the actual error e.g. "500 Unable to connect to backend database" or "500 Hard disk is on fire", or is this practice discouraged, the error should stay "500 Internal Server Error" and any additional information should be in the payload?</p>