Do no report errors on security exceptions.
parent
183f472f52
commit
4c93a72072
|
@ -63,10 +63,16 @@ public class BaseController {
|
|||
return new RestErrors(ex.getErrors(), messageSource);
|
||||
}
|
||||
|
||||
@ExceptionHandler(com.wisemapping.exceptions.AccessDeniedSecurityException.class)
|
||||
@ExceptionHandler(java.lang.reflect.UndeclaredThrowableException.class)
|
||||
@ResponseStatus(HttpStatus.BAD_REQUEST)
|
||||
public RestErrors handleSecurityErrors(@NotNull ValidationException ex) {
|
||||
return new RestErrors(ex.getErrors(), messageSource);
|
||||
}
|
||||
|
||||
@ExceptionHandler(com.wisemapping.exceptions.AccessDeniedSecurityException.class)
|
||||
@ResponseStatus(HttpStatus.BAD_REQUEST)
|
||||
public RestErrors handleSecurity2Errors(@NotNull ValidationException ex) {
|
||||
return new RestErrors(ex.getErrors(), messageSource);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue