Organize all this redundant code around returning various 400s