Add support for error codes