Removing templates from exception controller for json requests