Se protegendo de exceção no PUT
This commit is contained in:
parent
b0acacc9fb
commit
794af50f3a
1 changed files with 4 additions and 0 deletions
|
@ -45,7 +45,11 @@ public class RecursoJogo {
|
|||
@Path("{id}")
|
||||
public void atualizaJogo(@PathParam("id") UUID id, @Valid Jogo jogo) {
|
||||
jogo.setId(id);
|
||||
try {
|
||||
armarioJogo.update(jogo);
|
||||
} catch (OptimisticLockingFailureException e) {
|
||||
throw new NotFoundException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@DELETE
|
||||
|
|
Loading…
Reference in a new issue