Added exceptionHandlers in the controller, new tests, and entity that makes Json out of exception