Thanks for the reply.
What I mean is to change the short error msg after the error code in the HTTP response status line, not the response HTML page. My motivation is to keep nginx consistent with the upstream server. Although the error code consistence is enough in the functionality, it would be better if the short error msg can be changed by configuring or simply programming.