Commit e77cd821f249f7624dc3e226ee34c87e5aa1b07f
1 parent
14e748c0
Exists in
master
Considerando o media-type
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
impl/extension/rest/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/ConstraintViolationExceptionMapper.java
| ... | ... | @@ -69,7 +69,10 @@ public class ConstraintViolationExceptionMapper implements ExceptionMapper<Const |
| 69 | 69 | |
| 70 | 70 | getLogger().fine(getBundle().getString("mapping-violations", status, failed.getViolations().toString())); |
| 71 | 71 | |
| 72 | - return Response.status(status).entity(failed.getViolations()).build(); | |
| 72 | + Object entity = failed.getViolations(); | |
| 73 | + String mediaType = failed.getMediaType(); | |
| 74 | + | |
| 75 | + return Response.status(status).entity(entity).type(mediaType).build(); | |
| 73 | 76 | } |
| 74 | 77 | |
| 75 | 78 | private ResourceBundle getBundle() { | ... | ... |