ajamato commented on a change in pull request #12822:
URL: https://github.com/apache/beam/pull/12822#discussion_r488813424



##########
File path: sdks/python/apache_beam/io/gcp/bigquery_tools.py
##########
@@ -538,6 +539,13 @@ def _insert_all_rows(
     try:
       response = self.client.tabledata.InsertAll(request)
       # response.insertErrors is not [] if errors encountered.
+    except HttpError as exn:
+      if error_counter:
+        content = json.loads(exn.content)
+        error_counter.record(
+            '%s(%s)' %
+            (content['error']['errors'][0]['reason'], exn.status_code))

Review comment:
       Please convert this to the human readable format instead of the numeric 
http code. See the doc I shared with you.
   
   At least before logging
   https://cloud.google.com/apis/design/errors
   
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to