Skip to content

Commit

Permalink
Use UTF-8 character set in Content type header for error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelKoelbl1011 committed Mar 13, 2018
1 parent 4ae0a8a commit 9f5b223
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ subprojects {
// DO NOT FORGET TO DOCUMENT CHANGES IN CHANGELOG.md
//
// Add a GitHub release for every new release: https://github.com/otto-de/edison-microservice/releases
version = '1.2.14-SNAPSHOT'
version = '1.2.14'
group = 'de.otto.edison'

repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
import org.springframework.web.bind.annotation.ResponseStatus;

import static org.springframework.http.HttpStatus.UNPROCESSABLE_ENTITY;
import static org.springframework.http.MediaType.APPLICATION_JSON_UTF8;
import static org.springframework.http.ResponseEntity.unprocessableEntity;

@ControllerAdvice
public class ValidationExceptionHandler {

private static final MediaType APPLICATION_HAL_JSON_ERROR = MediaType.parseMediaType("application/hal+json; profiles=\"http://spec.otto.de/profiles/error\"");
private static final MediaType APPLICATION_HAL_JSON_ERROR = MediaType.parseMediaType("application/hal+json; " +
"profiles=\"http://spec.otto.de/profiles/error\"; charset=utf-8");
private final ErrorHalRepresentationFactory errorHalRepresentationFactory;

@Autowired
Expand Down

0 comments on commit 9f5b223

Please sign in to comment.