Changed the way of reporting of Error to standard approuch of generating Error and giving other middlewares to handle it