[keyserver] Improve logging in checkInputValidator
Summary:
This diff does two things:
- Adds logging in checkInputValidator so we know what input validator is being failed.
- Makes sure that we don't throw a different error if sanitizeInput fails due to input validation. Instead, we'll just not include the sanitizedInput in the error.
(On the second point, I'm not entirely sure if it's ever possible for sanitizeInput to succeed input validation if it fails earlier...)
Depends on D12386
Test Plan:
Prior to this, I was seeing an input validation failure when I tested an old client initiating a session recovery with refetchUserDataAfterAcknowledgment removed from the code.
The input validation failure was triggering a second input validation failure when trying to sanitize inputs, which was resulting in a weird error being returned to the client.
Following this change, I was seeing helpful logs of the keyserver side (indicating that the input validation failure was with keyserver_auth), and the keyserver started returning the expected invalid_parameters ServerError.
Reviewers: kamil, tomek
Reviewed By: kamil, tomek
Differential Revision: https://phab.comm.dev/D12387