We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 677b915 commit 1a02e5fCopy full SHA for 1a02e5f
v2/http.go
@@ -28,6 +28,7 @@ import (
28
"github.com/sirupsen/logrus"
29
goahttp "goa.design/goa/v3/http"
30
"goa.design/goa/v3/http/middleware"
31
+ goamiddleware "goa.design/goa/v3/middleware"
32
)
33
34
// Server is the actual server
@@ -70,7 +71,7 @@ func Server(home string) http.Handler {
70
71
// to correlate.
72
func errorHandler(logger *logrus.Logger) func(context.Context, http.ResponseWriter, error) {
73
return func(ctx context.Context, w http.ResponseWriter, err error) {
- id := ctx.Value(middleware.RequestID).(string)
74
+ id := ctx.Value(goamiddleware.RequestIDKey).(string)
75
w.Write([]byte("[" + id + "] encoding: " + err.Error()))
76
logger.Printf("[%s] ERROR: %s", id, err.Error())
77
}
0 commit comments