Extended onError method for returning also response object