Skip to content

Share exceptions when opening AppendRowsStream instead of the generic "Try turning on DEBUG level logs to see the error." exception #729

Open
@dhendry

Description

@dhendry
  • When an exception occurs opening a AppendRowsStream (for example when there is a protobuf-bq schema mismatch), a generic ` "There was a problem opening the stream. Try turning on DEBUG level logs to see the error." exception is raised which is incredibly unhelpful.
    • Our production services do not run with debug logs and I recently spent a lot of time trying to reproduce the conditions which would trigger a stream open error which would have been MUCH simpler if the exception was simply forwarded through.
  • There is the following TODO in the code here
        # Something went wrong when opening the RPC.
        if not is_consumer_active:
            # TODO: Share the exception from _rpc.open(). Blocked by
            # https://github.com/googleapis/python-api-core/issues/268
            request_exception = exceptions.Unknown(
                "There was a problem opening the stream. "
                "Try turning on DEBUG level logs to see the error."
            )
            self.close(reason=request_exception)
            raise request_exception

It appears googleapis/python-api-core#268 has been closed. It would be really awesome if this could be revisited.

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: bigquerystorageIssues related to the googleapis/python-bigquery-storage API.priority: p2Moderately-important priority. Fix may not be included in next release.status: investigatingThe issue is under investigation, which is determined to be non-trivial.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions