Skip to content

Commit 2ba73ae

Browse files
committed
Use goa.Endpoint for next again and do not return contexts from SendWithContext/ReceiveWithContext
1 parent 8035d69 commit 2ba73ae

File tree

76 files changed

+671
-973
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+671
-973
lines changed

codegen/service/templates/client_interceptor_stream_wrapper_types.go.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
type wrapped{{ .Interface }} struct {
55
ctx context.Context
66
{{- if ne .SendTypeRef "" }}
7-
sendWithContext func(context.Context, {{ .SendTypeRef }}) (context.Context, error)
7+
sendWithContext func(context.Context, {{ .SendTypeRef }}) error
88
{{- end }}
99
{{- if ne .RecvTypeRef "" }}
10-
recvWithContext func(context.Context) ({{ .RecvTypeRef }}, context.Context, error)
10+
recvWithContext func(context.Context) ({{ .RecvTypeRef }}, error)
1111
{{- end }}
1212
stream {{ .Interface }}
1313
}

codegen/service/templates/client_interceptor_stream_wrappers.go.tpl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44

55
{{ comment (printf "%s streams instances of \"%s\" after executing the applied interceptor." .SendName .Interface) }}
66
func (w *wrapped{{ .Interface }}) {{ .SendName }}(v {{ .SendTypeRef }}) error {
7-
_, err := w.SendWithContext(w.ctx, v)
8-
return err
7+
return w.SendWithContext(w.ctx, v)
98
}
109

1110
{{ comment (printf "%s streams instances of \"%s\" after executing the applied interceptor with context." .SendWithContextName .Interface) }}
12-
func (w *wrapped{{ .Interface }}) {{ .SendWithContextName }}(ctx context.Context, v {{ .SendTypeRef }}) (context.Context, error) {
11+
func (w *wrapped{{ .Interface }}) {{ .SendWithContextName }}(ctx context.Context, v {{ .SendTypeRef }}) error {
1312
if w.sendWithContext == nil {
1413
return w.stream.{{ .SendWithContextName }}(ctx, v)
1514
}
@@ -20,12 +19,11 @@ func (w *wrapped{{ .Interface }}) {{ .SendWithContextName }}(ctx context.Context
2019

2120
{{ comment (printf "%s reads instances of \"%s\" from the stream after executing the applied interceptor." .RecvName .Interface) }}
2221
func (w *wrapped{{ .Interface }}) {{ .RecvName }}() ({{ .RecvTypeRef }}, error) {
23-
res, _, err := w.RecvWithContext(w.ctx)
24-
return res, err
22+
return w.RecvWithContext(w.ctx)
2523
}
2624

2725
{{ comment (printf "%s reads instances of \"%s\" from the stream after executing the applied interceptor with context." .RecvWithContextName .Interface) }}
28-
func (w *wrapped{{ .Interface }}) {{ .RecvWithContextName }}(ctx context.Context) ({{ .RecvTypeRef }}, context.Context, error) {
26+
func (w *wrapped{{ .Interface }}) {{ .RecvWithContextName }}(ctx context.Context) ({{ .RecvTypeRef }}, error) {
2927
if w.recvWithContext == nil {
3028
return w.stream.{{ .RecvWithContextName }}(ctx)
3129
}

codegen/service/templates/client_interceptor_wrappers.go.tpl

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
{{- range .Methods }}
44

55
{{ comment (printf "wrapClient%s%s applies the %s client interceptor to endpoints." $interceptor.Name .MethodName $interceptor.DesignName) }}
6-
func wrapClient{{ .MethodName }}{{ $interceptor.Name }}(endpoint goa.InterceptorEndpoint, i ClientInterceptors) goa.InterceptorEndpoint {
7-
return func(ctx context.Context, req any) (any, context.Context, error) {
6+
func wrapClient{{ .MethodName }}{{ $interceptor.Name }}(endpoint goa.Endpoint, i ClientInterceptors) goa.Endpoint {
7+
return func(ctx context.Context, req any) (any, error) {
88
{{- if or $interceptor.HasStreamingPayloadAccess $interceptor.HasStreamingResultAccess }}
99
{{- if $interceptor.HasPayloadAccess }}
1010
info := &{{ $interceptor.Name }}Info{
@@ -13,48 +13,47 @@ func wrapClient{{ .MethodName }}{{ $interceptor.Name }}(endpoint goa.Interceptor
1313
callType: goa.InterceptorUnary,
1414
rawPayload: req,
1515
}
16-
res, ctx, err := i.{{ $interceptor.Name }}(ctx, info, endpoint)
16+
res, err := i.{{ $interceptor.Name }}(ctx, info, endpoint)
1717
{{- else }}
18-
res, ctx, err := endpoint(ctx, req)
18+
res, err := endpoint(ctx, req)
1919
{{- end }}
2020
if err != nil {
21-
return res, ctx, err
21+
return res, err
2222
}
2323
stream := res.({{ .ClientStream.Interface }})
2424
return &wrapped{{ .ClientStream.Interface }}{
2525
ctx: ctx,
2626
{{- if $interceptor.HasStreamingPayloadAccess }}
27-
sendWithContext: func(ctx context.Context, req {{ .ClientStream.SendTypeRef }}) (context.Context, error) {
27+
sendWithContext: func(ctx context.Context, req {{ .ClientStream.SendTypeRef }}) error {
2828
info := &{{ $interceptor.Name }}Info{
2929
service: "{{ $.Service }}",
3030
method: "{{ .MethodName }}",
3131
callType: goa.InterceptorStreamingSend,
3232
rawPayload: req,
3333
}
34-
_, ctx, err := i.{{ $interceptor.Name }}(ctx, info, func(ctx context.Context, req any) (any, context.Context, error) {
34+
_, err := i.{{ $interceptor.Name }}(ctx, info, func(ctx context.Context, req any) (any, error) {
3535
castReq, _ := req.({{ .ClientStream.SendTypeRef }})
36-
ctx, err = stream.{{ .ClientStream.SendWithContextName }}(ctx, castReq)
37-
return nil, ctx, err
36+
return nil, stream.{{ .ClientStream.SendWithContextName }}(ctx, castReq)
3837
})
39-
return ctx, err
38+
return err
4039
},
4140
{{- end }}
4241
{{- if $interceptor.HasStreamingResultAccess }}
43-
recvWithContext: func(ctx context.Context) ({{ .ClientStream.RecvTypeRef }}, context.Context, error) {
42+
recvWithContext: func(ctx context.Context) ({{ .ClientStream.RecvTypeRef }}, error) {
4443
info := &{{ $interceptor.Name }}Info{
4544
service: "{{ $.Service }}",
4645
method: "{{ .MethodName }}",
4746
callType: goa.InterceptorStreamingRecv,
4847
}
49-
res, ctx, err := i.{{ $interceptor.Name }}(ctx, info, func(ctx context.Context, _ any) (any, context.Context, error) {
48+
res, err := i.{{ $interceptor.Name }}(ctx, info, func(ctx context.Context, _ any) (any, error) {
5049
return stream.{{ .ClientStream.RecvWithContextName }}(ctx)
5150
})
5251
castRes, _ := res.({{ .ClientStream.RecvTypeRef }})
53-
return castRes, ctx, err
52+
return castRes, err
5453
},
5554
{{- end }}
5655
stream: stream,
57-
}, ctx, nil
56+
}, nil
5857
{{- else }}
5958
info := &{{ $interceptor.Name }}Info{
6059
service: "{{ $.Service }}",

codegen/service/templates/client_interceptors.go.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ type ClientInterceptors interface {
77
{{- if .Description }}
88
{{ comment .Description }}
99
{{- end }}
10-
{{ .Name }}(ctx context.Context, info *{{ .Name }}Info, next goa.InterceptorEndpoint) (any, context.Context, error)
10+
{{ .Name }}(ctx context.Context, info *{{ .Name }}Info, next goa.Endpoint) (any, error)
1111
{{- end }}
1212
}
Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11

22
{{ comment (printf "Wrap%sClientEndpoint wraps the %s endpoint with the client interceptors defined in the design." .MethodVarName .Method) }}
33
func Wrap{{ .MethodVarName }}ClientEndpoint(endpoint goa.Endpoint, i ClientInterceptors) goa.Endpoint {
4-
var interceptorEndpoint goa.InterceptorEndpoint = func(ctx context.Context, request any) (any, context.Context, error) {
5-
response, err := endpoint(ctx, request)
6-
return response, ctx, err
7-
}
8-
{{- range .Interceptors }}
9-
interceptorEndpoint = wrapClient{{ $.MethodVarName }}{{ . }}(interceptorEndpoint, i)
10-
{{- end }}
11-
return func(ctx context.Context, request any) (any, error) {
12-
response, _, err := interceptorEndpoint(ctx, request)
13-
return response, err
14-
}
4+
{{- range .Interceptors }}
5+
endpoint = wrapClient{{ $.MethodVarName }}{{ . }}(endpoint, i)
6+
{{- end }}
7+
return endpoint
158
}
Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
{{ comment (printf "Wrap%sEndpoint wraps the %s endpoint with the server-side interceptors defined in the design." .MethodVarName .Method) }}
22
func Wrap{{ .MethodVarName }}Endpoint(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint {
3-
var interceptorEndpoint goa.InterceptorEndpoint = func(ctx context.Context, request any) (any, context.Context, error) {
4-
response, err := endpoint(ctx, request)
5-
return response, ctx, err
6-
}
73
{{- range .Interceptors }}
8-
interceptorEndpoint = wrap{{ $.MethodVarName }}{{ . }}(interceptorEndpoint, i)
4+
endpoint = wrap{{ $.MethodVarName }}{{ . }}(endpoint, i)
95
{{- end }}
10-
return func(ctx context.Context, request any) (any, error) {
11-
response, _, err := interceptorEndpoint(ctx, request)
12-
return response, err
13-
}
6+
return endpoint
147
}

codegen/service/templates/example_client_interceptor.go.tpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ func New{{ .StructName }}ClientInterceptors() *{{ .StructName }}ClientIntercepto
1111
{{- if .Description }}
1212
{{ comment .Description }}
1313
{{- end }}
14-
func (i *{{ $.StructName }}ClientInterceptors) {{ .Name }}(ctx context.Context, info *{{ $.PkgName }}.{{ .Name }}Info, next goa.InterceptorEndpoint) (any, context.Context, error) {
14+
func (i *{{ $.StructName }}ClientInterceptors) {{ .Name }}(ctx context.Context, info *{{ $.PkgName }}.{{ .Name }}Info, next goa.Endpoint) (any, error) {
1515
log.Printf(ctx, "[{{ .Name }}] Sending request: %v", info.RawPayload())
16-
resp, ctx, err := next(ctx, info.RawPayload())
16+
resp, err := next(ctx, info.RawPayload())
1717
if err != nil {
1818
log.Printf(ctx, "[{{ .Name }}] Error: %v", err)
19-
return nil, ctx, err
19+
return nil, err
2020
}
2121
log.Printf(ctx, "[{{ .Name }}] Received response: %v", resp)
22-
return resp, ctx, nil
22+
return resp, nil
2323
}
2424
{{- end }}

codegen/service/templates/example_server_interceptor.go.tpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ func New{{ .StructName }}ServerInterceptors() *{{ .StructName }}ServerIntercepto
1111
{{- if .Description }}
1212
{{ comment .Description }}
1313
{{- end }}
14-
func (i *{{ $.StructName }}ServerInterceptors) {{ .Name }}(ctx context.Context, info *{{ $.PkgName }}.{{ .Name }}Info, next goa.InterceptorEndpoint) (any, context.Context, error) {
14+
func (i *{{ $.StructName }}ServerInterceptors) {{ .Name }}(ctx context.Context, info *{{ $.PkgName }}.{{ .Name }}Info, next goa.Endpoint) (any, error) {
1515
log.Printf(ctx, "[{{ .Name }}] Processing request: %v", info.RawPayload())
16-
resp, ctx, err := next(ctx, info.RawPayload())
16+
resp, err := next(ctx, info.RawPayload())
1717
if err != nil {
1818
log.Printf(ctx, "[{{ .Name }}] Error: %v", err)
19-
return nil, ctx, err
19+
return nil, err
2020
}
2121
log.Printf(ctx, "[{{ .Name }}] Response: %v", resp)
22-
return resp, ctx, nil
22+
return resp, nil
2323
}
2424
{{- end }}

codegen/service/templates/server_interceptor_stream_wrapper_types.go.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
type wrapped{{ .Interface }} struct {
55
ctx context.Context
66
{{- if ne .SendTypeRef "" }}
7-
sendWithContext func(context.Context, {{ .SendTypeRef }}) (context.Context, error)
7+
sendWithContext func(context.Context, {{ .SendTypeRef }}) error
88
{{- end }}
99
{{- if ne .RecvTypeRef "" }}
10-
recvWithContext func(context.Context) ({{ .RecvTypeRef }}, context.Context, error)
10+
recvWithContext func(context.Context) ({{ .RecvTypeRef }}, error)
1111
{{- end }}
1212
stream {{ .Interface }}
1313
}

codegen/service/templates/server_interceptor_stream_wrappers.go.tpl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44

55
{{ comment (printf "%s streams instances of \"%s\" after executing the applied interceptor." .SendName .Interface) }}
66
func (w *wrapped{{ .Interface }}) {{ .SendName }}(v {{ .SendTypeRef }}) error {
7-
_, err := w.SendWithContext(w.ctx, v)
8-
return err
7+
return w.SendWithContext(w.ctx, v)
98
}
109

1110
{{ comment (printf "%s streams instances of \"%s\" after executing the applied interceptor with context." .SendWithContextName .Interface) }}
12-
func (w *wrapped{{ .Interface }}) {{ .SendWithContextName }}(ctx context.Context, v {{ .SendTypeRef }}) (context.Context, error) {
11+
func (w *wrapped{{ .Interface }}) {{ .SendWithContextName }}(ctx context.Context, v {{ .SendTypeRef }}) error {
1312
if w.sendWithContext == nil {
1413
return w.stream.{{ .SendWithContextName }}(ctx, v)
1514
}
@@ -20,12 +19,11 @@ func (w *wrapped{{ .Interface }}) {{ .SendWithContextName }}(ctx context.Context
2019

2120
{{ comment (printf "%s reads instances of \"%s\" from the stream after executing the applied interceptor." .RecvName .Interface) }}
2221
func (w *wrapped{{ .Interface }}) {{ .RecvName }}() ({{ .RecvTypeRef }}, error) {
23-
res, _, err := w.RecvWithContext(w.ctx)
24-
return res, err
22+
return w.RecvWithContext(w.ctx)
2523
}
2624

2725
{{ comment (printf "%s reads instances of \"%s\" from the stream after executing the applied interceptor with context." .RecvWithContextName .Interface) }}
28-
func (w *wrapped{{ .Interface }}) {{ .RecvWithContextName }}(ctx context.Context) ({{ .RecvTypeRef }}, context.Context, error) {
26+
func (w *wrapped{{ .Interface }}) {{ .RecvWithContextName }}(ctx context.Context) ({{ .RecvTypeRef }}, error) {
2927
if w.recvWithContext == nil {
3028
return w.stream.{{ .RecvWithContextName }}(ctx)
3129
}

codegen/service/templates/server_interceptor_wrappers.go.tpl

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
{{- range .Methods }}
44

55
{{ comment (printf "wrap%s%s applies the %s server interceptor to endpoints." $interceptor.Name .MethodName $interceptor.DesignName) }}
6-
func wrap{{ .MethodName }}{{ $interceptor.Name }}(endpoint goa.InterceptorEndpoint, i ServerInterceptors) goa.InterceptorEndpoint {
7-
return func(ctx context.Context, req any) (any, context.Context, error) {
6+
func wrap{{ .MethodName }}{{ $interceptor.Name }}(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint {
7+
return func(ctx context.Context, req any) (any, error) {
88
{{- if or $interceptor.HasStreamingPayloadAccess $interceptor.HasStreamingResultAccess }}
99
{{- if $interceptor.HasPayloadAccess }}
1010
info := &{{ $interceptor.Name }}Info{
@@ -13,48 +13,47 @@ func wrap{{ .MethodName }}{{ $interceptor.Name }}(endpoint goa.InterceptorEndpoi
1313
callType: goa.InterceptorUnary,
1414
rawPayload: req,
1515
}
16-
res, ctx, err := i.{{ $interceptor.Name }}(ctx, info, endpoint)
16+
res, err := i.{{ $interceptor.Name }}(ctx, info, endpoint)
1717
{{- else }}
18-
res, ctx, err := endpoint(ctx, req)
18+
res, err := endpoint(ctx, req)
1919
{{- end }}
2020
if err != nil {
21-
return res, ctx, err
21+
return res, err
2222
}
2323
stream := res.({{ .ServerStream.Interface }})
2424
return &wrapped{{ .ServerStream.Interface }}{
2525
ctx: ctx,
2626
{{- if $interceptor.HasStreamingResultAccess }}
27-
sendWithContext: func(ctx context.Context, req {{ .ServerStream.SendTypeRef }}) (context.Context, error) {
27+
sendWithContext: func(ctx context.Context, req {{ .ServerStream.SendTypeRef }}) error {
2828
info := &{{ $interceptor.Name }}Info{
2929
service: "{{ $.Service }}",
3030
method: "{{ .MethodName }}",
3131
callType: goa.InterceptorStreamingSend,
3232
rawPayload: req,
3333
}
34-
_, ctx, err := i.{{ $interceptor.Name }}(ctx, info, func(ctx context.Context, req any) (any, context.Context, error) {
34+
_, err := i.{{ $interceptor.Name }}(ctx, info, func(ctx context.Context, req any) (any, error) {
3535
castReq, _ := req.({{ .ServerStream.SendTypeRef }})
36-
ctx, err := stream.{{ .ServerStream.SendWithContextName }}(ctx, castReq)
37-
return nil, ctx, err
36+
return nil, stream.{{ .ServerStream.SendWithContextName }}(ctx, castReq)
3837
})
39-
return ctx, err
38+
return err
4039
},
4140
{{- end }}
4241
{{- if $interceptor.HasStreamingPayloadAccess }}
43-
recvWithContext: func(ctx context.Context) ({{ .ServerStream.RecvTypeRef }}, context.Context, error) {
42+
recvWithContext: func(ctx context.Context) ({{ .ServerStream.RecvTypeRef }}, error) {
4443
info := &{{ $interceptor.Name }}Info{
4544
service: "{{ $.Service }}",
4645
method: "{{ .MethodName }}",
4746
callType: goa.InterceptorStreamingRecv,
4847
}
49-
res, ctx, err := i.{{ $interceptor.Name }}(ctx, info, func(ctx context.Context, _ any) (any, context.Context, error) {
48+
res, err := i.{{ $interceptor.Name }}(ctx, info, func(ctx context.Context, _ any) (any, error) {
5049
return stream.{{ .ServerStream.RecvWithContextName }}(ctx)
5150
})
5251
castRes, _ := res.({{ .ServerStream.RecvTypeRef }})
53-
return castRes, ctx, err
52+
return castRes, err
5453
},
5554
{{- end }}
5655
stream: stream,
57-
}, ctx, nil
56+
}, nil
5857
{{- else }}
5958
info := &{{ $interceptor.Name }}Info{
6059
service: "{{ $.Service }}",

codegen/service/templates/server_interceptors.go.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ type ServerInterceptors interface {
77
{{- if .Description }}
88
{{ comment .Description }}
99
{{- end }}
10-
{{ .Name }}(ctx context.Context, info *{{ .Name }}Info, next goa.InterceptorEndpoint) (any, context.Context, error)
10+
{{ .Name }}(ctx context.Context, info *{{ .Name }}Info, next goa.Endpoint) (any, error)
1111
{{- end }}
1212
}

codegen/service/templates/service.go.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ type {{ .Stream.Interface }} interface {
6565
{{ comment .Stream.SendDesc }}
6666
{{ .Stream.SendName }}({{ .Stream.SendTypeRef }}) error
6767
{{ comment .Stream.SendWithContextDesc }}
68-
{{ .Stream.SendWithContextName }}(context.Context, {{ .Stream.SendTypeRef }}) (context.Context, error)
68+
{{ .Stream.SendWithContextName }}(context.Context, {{ .Stream.SendTypeRef }}) error
6969
{{- end }}
7070
{{- if .Stream.RecvTypeRef }}
7171
{{ comment .Stream.RecvDesc }}
7272
{{ .Stream.RecvName }}() ({{ .Stream.RecvTypeRef }}, error)
7373
{{ comment .Stream.RecvWithContextDesc }}
74-
{{ .Stream.RecvWithContextName }}(context.Context) ({{ .Stream.RecvTypeRef }}, context.Context, error)
74+
{{ .Stream.RecvWithContextName }}(context.Context) ({{ .Stream.RecvTypeRef }}, error)
7575
{{- end }}
7676
{{- if .Stream.MustClose }}
7777
{{ comment "Close closes the stream." }}

codegen/service/testdata/example_interceptors/api_interceptor_service_client.golden

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ type APIInterceptorServiceClientInterceptors struct {
2323
func NewAPIInterceptorServiceClientInterceptors() *APIInterceptorServiceClientInterceptors {
2424
return &APIInterceptorServiceClientInterceptors{}
2525
}
26-
func (i *APIInterceptorServiceClientInterceptors) API(ctx context.Context, info *interceptors.APIInfo, next goa.InterceptorEndpoint) (any, context.Context, error) {
26+
func (i *APIInterceptorServiceClientInterceptors) API(ctx context.Context, info *interceptors.APIInfo, next goa.Endpoint) (any, error) {
2727
log.Printf(ctx, "[API] Sending request: %v", info.RawPayload())
28-
resp, ctx, err := next(ctx, info.RawPayload())
28+
resp, err := next(ctx, info.RawPayload())
2929
if err != nil {
3030
log.Printf(ctx, "[API] Error: %v", err)
31-
return nil, ctx, err
31+
return nil, err
3232
}
3333
log.Printf(ctx, "[API] Received response: %v", resp)
34-
return resp, ctx, nil
34+
return resp, nil
3535
}

codegen/service/testdata/example_interceptors/api_interceptor_service_server.golden

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ type APIInterceptorServiceServerInterceptors struct {
2323
func NewAPIInterceptorServiceServerInterceptors() *APIInterceptorServiceServerInterceptors {
2424
return &APIInterceptorServiceServerInterceptors{}
2525
}
26-
func (i *APIInterceptorServiceServerInterceptors) API(ctx context.Context, info *interceptors.APIInfo, next goa.InterceptorEndpoint) (any, context.Context, error) {
26+
func (i *APIInterceptorServiceServerInterceptors) API(ctx context.Context, info *interceptors.APIInfo, next goa.Endpoint) (any, error) {
2727
log.Printf(ctx, "[API] Processing request: %v", info.RawPayload())
28-
resp, ctx, err := next(ctx, info.RawPayload())
28+
resp, err := next(ctx, info.RawPayload())
2929
if err != nil {
3030
log.Printf(ctx, "[API] Error: %v", err)
31-
return nil, ctx, err
31+
return nil, err
3232
}
3333
log.Printf(ctx, "[API] Response: %v", resp)
34-
return resp, ctx, nil
34+
return resp, nil
3535
}

0 commit comments

Comments
 (0)