Add error codes
Add validation for interface