spanner: new method for declaring spanner.Error #3122
Labels
api: spanner
Issues related to the Spanner API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
Is your feature request related to a problem? Please describe.
In spanner, Code field in Error struct is deprecated and spanner recommends using ErrCode method for extracting the err code.
But we don't have a method for declaring it(ex. NewError()). we can't declare spanner.Error struct without Error.Code field in unit tests.
Describe the solution you'd like
I want a new method for declaration of spanner.Error struct.
ex. cloud.google.com/go/spanner/errors.go
Describe alternatives you've considered
spanner user can declare spanner.Error struct in unit tests without deprecated spanner.Error.Code field.
The text was updated successfully, but these errors were encountered: