DEV Community

Discussion on: August 26th, 2021: What did you learn this week?

Collapse
bglamadrid profile image
Benjamin La Madrid

I learned I can track the root of any raised exception within Spring Web MVC by bypassing filters with the use of a class annotated with @ControllerAdvice and a corresponding method annotated with @ExceptionHandler and the desired exception to catch.
In the end, the issue's root cause was myself, sending invalid JSON (took me a whole hour to realize it! I blame Postman though).
Still, using said annotations helped me unveil how and where did my tests fail.

Collapse
nickytonline profile image
Nick Taylor Author

Nice!

Nice