Skip to content

Commit 6f264c4

Browse files
committed
address "ambiguous import" errors from older grpc dependencies
1 parent ed87a70 commit 6f264c4

File tree

5 files changed

+63
-401
lines changed

5 files changed

+63
-401
lines changed

bdd_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ func InitializeTestSuite(ctx *godog.TestSuiteContext) {
384384

385385
func InitializeScenario(ctx *godog.ScenarioContext) {
386386
ctx.Before(func(ctx context.Context, sc *godog.Scenario) (context.Context, error) {
387-
expectedError = ErrUnknown
387+
expectedError = stderrors.New("test error")
388388
return ctx, nil
389389
})
390390

features/transmission.feature

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ Feature: Transmission of errors over GRPC
88
Then the HTTP status is "OK"
99
Then the Type code is ""
1010

11-
Scenario: standard errors are treated as unknowns
11+
Scenario: standard errors are treated as internal server errors
1212
Given an error with the message "standard error"
1313
When the error is sent over GRPC
14-
Then the GRPC code is "Unknown"
15-
Then the HTTP status is "Not Extended"
16-
Then the Type code is "UNKNOWN"
17-
Then the error message is "standard error"
14+
Then the GRPC code is "Internal"
15+
Then the HTTP status is "Internal Server Error"
16+
Then the Type code is "INTERNAL_SERVER_ERROR"
17+
Then the error message is "standard error: test error"
1818

1919
Scenario: GRPC errors do not pick up extra info
2020
Given an error with GRPC code "codes.PermissionDenied"
@@ -35,4 +35,4 @@ Feature: Transmission of errors over GRPC
3535
Then the error message is "error message"
3636
Then the error is a "ErrNotImplemented"
3737
Then the error is a "ErrPermissionDenied"
38-
Then the error is a "ErrBadRequest"
38+
Then the error is a "ErrBadRequest"

features/wrapping.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Feature: Wrapping errors
55
Given an error with the message "some error"
66
When wrapped with the message "more context"
77
When wrapped with the message "even more context"
8-
Then the error message is "even more context: more context: some error"
8+
Then the error message is "even more context: more context: some error: test error"
99

1010
Scenario: errors with Type codes are embedded
1111
Given an error with Type code "CUSTOM"

go.mod

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
module github.com/stackus/errors
22

3-
go 1.20
3+
go 1.24.0
44

55
require (
6-
github.com/cucumber/godog v0.12.5
7-
google.golang.org/grpc v1.47.0
8-
google.golang.org/protobuf v1.28.0
6+
github.com/cucumber/godog v0.15.0
7+
google.golang.org/grpc v1.72.0
8+
google.golang.org/protobuf v1.36.6
99
)
1010

1111
require (
12-
github.com/cucumber/gherkin-go/v19 v19.0.3 // indirect
13-
github.com/cucumber/messages-go/v16 v16.0.1 // indirect
14-
github.com/gofrs/uuid v4.0.0+incompatible // indirect
15-
github.com/golang/protobuf v1.5.2 // indirect
16-
github.com/hashicorp/go-immutable-radix v1.3.0 // indirect
17-
github.com/hashicorp/go-memdb v1.3.0 // indirect
12+
github.com/cucumber/gherkin/go/v26 v26.2.0 // indirect
13+
github.com/cucumber/messages/go/v21 v21.0.1 // indirect
14+
github.com/gofrs/uuid v4.3.1+incompatible // indirect
15+
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
16+
github.com/hashicorp/go-memdb v1.3.4 // indirect
1817
github.com/hashicorp/golang-lru v0.5.4 // indirect
1918
github.com/spf13/pflag v1.0.5 // indirect
20-
google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 // indirect
19+
golang.org/x/net v0.39.0 // indirect
20+
golang.org/x/sys v0.32.0 // indirect
21+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250505200425-f936aa4a68b2 // indirect
2122
)

0 commit comments

Comments
 (0)