Adds handling of HTTP 400 errors (BadRequest)