Added error codes

Added error codes