Separate error handling for register