Commit a2290723 authored by Bazarbay Tulenov's avatar Bazarbay Tulenov

change error message

parent c8b67725
Pipeline #379 failed with stage
......@@ -18,7 +18,7 @@ public class ResponseErrorDto {
private String errorMessage;
@NotBlank
@Schema(name = "code")
private int code;
private int errorCode;
}
......@@ -56,7 +56,7 @@ public class TemplateServiceImpl implements TemplateService {
public Map<String, byte[]> getTemplate(Long id) throws ValidationException, JsonProcessingException {
Map<String, byte[]> params = new HashMap<>();
TemplateEntity templateEntity = repository.findById(id).orElse(null);
if (templateEntity == null) throw new ValidationException("по данному параметру отсутствуют данные: " + id, 13);
if (templateEntity == null) throw new ValidationException("Не найден шаблон с идентификатором: " + id, 13);
TemplateDataForReportDto templ = new TemplateDataForReportDto(templateEntity.getType().getCode(), templateEntity.getTemplate().getData(), templateEntity.getTemplateHeader() != null ? templateEntity.getTemplateHeader().getData() : null);
params.put("type", templ.getType().getBytes(StandardCharsets.UTF_8));
params.put("body", templ.getBody());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment