Adding error codes for model