Skip to content

Commit

Permalink
raise exception
Browse files Browse the repository at this point in the history
  • Loading branch information
chemelnucfin committed Dec 20, 2017
1 parent 3a2767d commit 6f63dc4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions spanner/google/cloud/spanner_v1/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,7 @@ def create(self):
)
except GaxError as exc:
exception = exceptions.from_grpc_error(exc.cause)
if exception.grpc_status_code == StatusCode.ALREADY_EXISTS:
raise Conflict(self.name)
elif exception.grpc_status_code == StatusCode.NOT_FOUND:
raise exception.errors[0]
raise
raise exception
return future

def exists(self):
Expand Down

0 comments on commit 6f63dc4

Please sign in to comment.