You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 8, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 8, 2026. It is now read-only.
DatabaseAdmin: on Duplicate name in Schema, gRPC FailedPrecondition status code is not handled and sent back as None #38
If I have a table that already exists and try to create the same table, this package errors but its error code is None yet its message is Duplicate name in schema: .
Code: None gRPC_StatusCode: None Message: Duplicate name in schema: foo.
Traceback (most recent call last):
File "duplicate_table_v1.py", line 18, in<module>main()
File "duplicate_table_v1.py", line 12, in main
raise e
File "duplicate_table_v1.py", line 8, in main
result = lro.result()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/google/api_core/future/polling.py", line 127, in result
raise self._exception
google.api_core.exceptions.GoogleAPICallError: None Duplicate name in schema: foo.
This bug presents an inconsistency in the error handling because we get an error with a None status code and None gRPC status code, yet it has a message.
Comparison with Go
I can confirm that Cloud Spanner actually sends back the status code because the Go result actually has the status code, with this reproduction and by investigation the responses sent by the Spanner server
The same issue exists when I try to create a new table whose casing is different from a table that exists already e.g. t1 being created, when T1 already exists
google.api_core.exceptions.GoogleAPICallError: None Schema object names differ only in case: T1, t1.
Activity
dbapi: make duplicate table error return DatabaseError + refactor
dbapi: make duplicate table error return DatabaseError + refactor
dbapi: make duplicate table error return DatabaseError + refactor
odeke-em commentedon Mar 16, 2020
The same issue exists when I try to create a new table whose casing is different from a table that exists already e.g. t1 being created, when T1 already exists
google.api_core.exceptions.GoogleAPICallError: None Schema object names differ only in case: T1, t1.larkee commentedon Mar 23, 2020
Thanks for filing this issue!
This issue is due to a bug in another repo (python-api-core). I have made a bug in that repo and am close this one.