File tree Expand file tree Collapse file tree 5 files changed +63
-401
lines changed Expand file tree Collapse file tree 5 files changed +63
-401
lines changed Original file line number Diff line number Diff line change @@ -384,7 +384,7 @@ func InitializeTestSuite(ctx *godog.TestSuiteContext) {
384
384
385
385
func InitializeScenario (ctx * godog.ScenarioContext ) {
386
386
ctx .Before (func (ctx context.Context , sc * godog.Scenario ) (context.Context , error ) {
387
- expectedError = ErrUnknown
387
+ expectedError = stderrors . New ( "test error" )
388
388
return ctx , nil
389
389
})
390
390
Original file line number Diff line number Diff line change @@ -8,13 +8,13 @@ Feature: Transmission of errors over GRPC
8
8
Then the HTTP status is "OK"
9
9
Then the Type code is ""
10
10
11
- Scenario : standard errors are treated as unknowns
11
+ Scenario : standard errors are treated as internal server errors
12
12
Given an error with the message "standard error"
13
13
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 "
18
18
19
19
Scenario : GRPC errors do not pick up extra info
20
20
Given an error with GRPC code "codes.PermissionDenied"
@@ -35,4 +35,4 @@ Feature: Transmission of errors over GRPC
35
35
Then the error message is "error message"
36
36
Then the error is a "ErrNotImplemented"
37
37
Then the error is a "ErrPermissionDenied"
38
- Then the error is a "ErrBadRequest"
38
+ Then the error is a "ErrBadRequest"
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ Feature: Wrapping errors
5
5
Given an error with the message "some error"
6
6
When wrapped with the message "more context"
7
7
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 "
9
9
10
10
Scenario : errors with Type codes are embedded
11
11
Given an error with Type code "CUSTOM"
Original file line number Diff line number Diff line change 1
1
module github.com/stackus/errors
2
2
3
- go 1.20
3
+ go 1.24.0
4
4
5
5
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
9
9
)
10
10
11
11
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
18
17
github.com/hashicorp/golang-lru v0.5.4 // indirect
19
18
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
21
22
)
You can’t perform that action at this time.
0 commit comments