handle bad request errors
Merge pull request #72 from qcode-software/bad_request

handle bad request errors