fix error codes returned to client on failed challenges
500 signifies there's a problem with the server, but this is not actually the case here: the client has provided invalid data.
500 signifies there's a problem with the server, but this is not actually the case here: the client has provided invalid data.