- Building Microservices with Go
- Nic Jackson
- 136字
- 2021-07-15 17:28:11
5xx Server Error
Response status codes within the 500 range indicate that something has gone "Bang", the server knows this and is sorry for the situation.
The RFC advises that an error entity should be returned in the response explaining whether this is permanent or temporary and containing an explanation of the error. When we look at our chapter on security we will look at the recommendation about not giving too much information away in error messages as this state may have been engineered by a user in the attempt to compromise your system and by returning things such as a stack trace or other internal information with a 5xx error can actually help to compromise your system. With this in mind it is currently common that a 500 error will just return something very generic.