added some custom error codes for failed registeratinos