Added HTTPError Check, Style fix

Added HTTPError 400 check for invalid query format. Will probably occur
from user formatting incorrectly.