The code is correct, otherwise the error would be different than "The code has already been registered".

We have checked more than once especially for that d's or 0's confusion : x