DEV Community

JameBone
JameBone

Posted on

Answer: Spring Boot @RestControllerAdvice works locally but not on Render deployment

1. Exception Happens Before Controller Layer (Most Common)

Your DataIntegrityViolationException is being thrown at the repository/database layer, but it's being wrapped or transformed by a transaction manager or other infrastructure before it reaches your exception handler. On Render, the environment might be different enough to change how exceptions propagate.

Try…

Top comments (0)