For anyone else interested in the code, I believe these are the repos -
This developer uses Python though, which seems like it does the correct thing in raising an error instead of just returning a -1. I'd have to look through the Python code to be sure through: