From https://gitlab.wikimedia.org/repos/mediawiki/services/ipoid/-/merge_requests/213#note_68634
500 always indicates an error that the server doesn't know how to handle. If it does know how to handle, like apparently in this case, where the mistake is on the client side since they provide a badly formatted input that is none of the acceptable formats, you want a 400.
Acceptance criteria:
- request data for an invalid IP should return a 400 error, not a 500 error