Repository: googleapis/google-cloud-python

Issue:
error reporting still broken at 0.24
After updating to 0.24 to fix https://github.com/GoogleCloudPlatform/google-cloud-python/issues/3167 I'm still unable to report exceptions.

Ubuntu xenial w/ Python 3.5.2

```python
client.report_exception(http_context=error_reporting.build_flask_context(flask.request))
```

On google-cloud-error-reporting <0.23 the above line works fine. At 0.24 I get:

```python
Apr  1 15:52:51   File "/usr/local/lib/python3.5/dist-packages/google/cloud/error_reporting/client.py", line 347, in report_exception
Apr  1 15:52:51     user=user)
Apr  1 15:52:51   File "/usr/local/lib/python3.5/dist-packages/google/cloud/error_reporting/client.py", line 276, in _send_error_report
Apr  1 15:52:51     self.report_errors_api.report_error_event(error_report)
Apr  1 15:52:51   File "/usr/local/lib/python3.5/dist-packages/google/cloud/error_reporting/_gax.py", line 75, in report_error_event
Apr  1 15:52:51     ParseDict(error_report, error_report_payload)
Apr  1 15:52:51   File "/usr/local/lib/python3.5/dist-packages/google/protobuf/json_format.py", line 384, in ParseDict
Apr  1 15:52:51     parser.ConvertMessage(js_dict, message)
Apr  1 15:52:51   File "/usr/local/lib/python3.5/dist-packages/google/protobuf/json_format.py", line 415, in ConvertMessage
Apr  1 15:52:51     self._ConvertFieldValuePair(value, message)
Apr  1 15:52:51   File "/usr/local/lib/python3.5/dist-packages/google/protobuf/json_format.py", line 501, in _ConvertFieldValuePair
Apr  1 15:52:51     raise ParseError('Failed to parse {0} field: {1}'.format(name, e))"   
```


Discussion:
Hi @asilversempirical,
That is frustrating. We will try to figure out what the problem is.

Resolving patch:
diff --git a/error_reporting/google/cloud/error_reporting/client.py b/error_reporting/google/cloud/error_reporting/client.py
--- a/error_reporting/google/cloud/error_reporting/client.py
+++ b/error_reporting/google/cloud/error_reporting/client.py
@@ -224,11 +224,10 @@ def _build_error_report(self,
         if http_context:
             http_context_dict = http_context.__dict__
             # strip out None values
-            payload['context']['httpContext'] = {
+            payload['context']['httpRequest'] = {
                 key: value for key, value in six.iteritems(http_context_dict)
                 if value is not None
             }
-
         if user:
             payload['context']['user'] = user
         return payload


Test patch:
diff --git a/error_reporting/tests/unit/test_client.py b/error_reporting/tests/unit/test_client.py
--- a/error_reporting/tests/unit/test_client.py
+++ b/error_reporting/tests/unit/test_client.py
@@ -149,9 +149,9 @@ def test_report_exception_with_service_version_in_constructor(
             payload['message'])
         self.assertIn('test_client.py', payload['message'])
         self.assertEqual(
-            payload['context']['httpContext']['responseStatusCode'], 500)
+            payload['context']['httpRequest']['responseStatusCode'], 500)
         self.assertEqual(
-            payload['context']['httpContext']['method'], 'GET')
+            payload['context']['httpRequest']['method'], 'GET')
         self.assertEqual(payload['context']['user'], user)
 
     @mock.patch('google.cloud.error_reporting.client.make_report_error_api')