While using @RequestBody StreamSource found out, that if xml in request body in not valid StreamSource throws an Exception(resulting in 400 Bad Request) and i’m not able to handle it(tell client what is bad).
Is there a way to handle such exception?
In general You can catch exception in Spring MVC that way:
You can map it to any exception time and redirect user to any page with any mesage.
Alternatively: you can return it in
@ResponseBody: