Add support for errors