My only recommendation is to add better input filtering on the front end. For example, I initially copy and pasted the whole URL and it gave a 400 error. e.g. https://github.com/QCgeneral29/
Then I realized it was only the username, so I deleted the url part, but forgot to remove the / at the end e.g.
QCgeneral29/
Another 400 error. Finally, I entered QCgeneral29 and it worked.
Edit: same for badges related to creating a repo that reaches x amount of stars and helpful comments on issues