Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 85d7c55c authored by Pawel GUTOWSKI's avatar Pawel GUTOWSKI
Browse files

EDELIVERY-2806 Fixed UTF-8 encoding in error responses

parent c7e932f2
No related branches found
No related tags found
No related merge requests found
......@@ -34,6 +34,7 @@ public class ErrorResponseBuilder {
private static final Logger log = LoggerFactory.getLogger(ErrorResponseBuilder.class);
public static final MediaType CONTENT_TYPE_TEXT_XML_UTF8 = MediaType.valueOf("text/xml; charset=UTF-8");
private HttpStatus status = INTERNAL_SERVER_ERROR;
private ErrorBusinessCode errorBusinessCode = TECHNICAL;
private String strErrorDescription = "Unexpected technical error occurred.";
......@@ -78,7 +79,7 @@ public class ErrorResponseBuilder {
public ResponseEntity build() {
return ResponseEntity.status(this.status)
.contentType(MediaType.TEXT_XML)
.contentType(CONTENT_TYPE_TEXT_XML_UTF8)
.body(this.buildBody());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment