Returning 4xx HTTPs when the user input is invalid