Handling not accepted exception