@ControllerAdvice
public class GlobalExceptionController {
@ExceptionHandler(AccessDeniedException.class)
@ResponseStatus(HttpStatus.UNAUTHORIZED)
public @ResponseBody
String handleAllRuntimeException(AccessDeniedException ex) {
return ex.getMessage();
}
}
--
You received this message because you are subscribed to the Google Groups "REST assured" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-assured...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.