Relative Content

Tag Archive for springpostgresqlspring-boot

Spring Boot: Handling PostgreSQL Trigger Exceptions in a DELETE Request

I’m experiencing an issue with my Spring Boot web application when trying to handle exceptions thrown by a PostgreSQL BEFORE DELETE trigger during a DELETE request. Here is the situation:
When a DELETE request is made, a PostgreSQL trigger checks whether the item can be deleted. If it cannot be deleted, the trigger raises an exception. This exception should be caught by a GlobalExceptionHandler in Spring to display an appropriate error message on the front-end.