0

I want to know if there are any default globalErrors in Spring framework. I need to create my own custom validator by implementing org.springframework.validation.Validator interface. And there I add a globalError by errors.reject().

In controller class I have to catch this custom validation error If it's occurred. My plan is to catch it by using getGlobalErrors method. But if there any default globalErrors in spring, they will be also caught by getGlobalErrors method.

So I really need to know if there are any default globalErrors in Spring framework.

2 Answers2

0

Well, actually I think there is just one type of errors - when object or some of its fields cannot be mapped to Java object.

For example - when you are trying to set null value from your front-end for LocalDateTime - it's gonna give you an error.

I really believe there are no other errors you can have.

20 fps
  • 342
  • 5
  • 18