Add support for errors case