400 error handling added

added HTTP 400 error check
catch errors like this:
{"http_status_code":400,"http_status_message":"Bad Request","internal_message":"Bad format: locale"}