Refactoring: Exctract ResponseCodes class from Endpoint

I have nothing to say ...
Use a guard clause instead of wrapping the code inside a conditional expression.