Make private posts error when converting from public to private

I have a public repository that I’d like to make private. When I press the “Make private” button and confirm the repository name I get the following error: "cannot POST (400)

I have the exact same error: It is shown after entering the name of the repository.
cannot POST (400)