Nexmo / comms-router

A server which allows you to route tasks to agents.
Apache License 2.0
21 stars 11 forks source link

Constraint violation is not shown in the exception #50

Closed angel-popov closed 6 years ago

angel-popov commented 6 years ago

Create router create queue create task delete the queue

Result: curl -s -X DELETE 'http://localhost:8080/comms-router-web/api'/routers/2UXjqSk7idphb94Uxa9x37/queues/S5TzNM9oALGGfNKEJBR906 -H 'Content-type:application/json' {"error":{"code":"ClassCastException","description":"com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException cannot be cast to org.hibernate.exception.ConstraintViolationException"}} Expected: somethink that mention what is wrong {"error""code":"ReferenceIntegrityViolationException","description":"com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (comms_router_core.route, CONSTRAINT fk_route__queue FOREIGN KEY (queue_id) REFERENCES queue (id) ON DELETE NO ACTION ON UPDATE NO ACTION)"}}