Validate HTTP API user input

For example, raft indices must be sane integers.
I don't like to leave nil cases unhandled, so would appreciate a suggestion of something to do. log+return?