class TppErrorMessageWriter {

    public void writeError(HttpServletResponse response, TppErrorMessage tppErrorMessage) throws IOException {
        MessageErrorCode messageErrorCode = tppErrorMessage.getCode();
        MessageError messageError = new MessageError(getErrorType(messageErrorCode.getCode()), TppMessageInformation.of(tppErrorMessage.getCategory(), messageErrorCode, tppErrorMessage.getTextParams()));
        writeMessageError(response, messageError);
    }

}