Skip to content

Commit

Permalink
fix(spanner): fallback to check grpc error message if ResourceType is…
Browse files Browse the repository at this point in the history
… nil for checking sessionNotFound errors
  • Loading branch information
rahul2393 committed Dec 14, 2022
1 parent 6bb95ef commit d73f427
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spanner/session.go
Expand Up @@ -1720,6 +1720,8 @@ func isSessionNotFoundError(err error) bool {
if ErrCode(err) == codes.NotFound {
if rt, ok := extractResourceType(err); ok {
return rt == sessionResourceType
} else {
return strings.Contains(err.Error(), "Session not found")
}
}
return false
Expand Down

0 comments on commit d73f427

Please sign in to comment.