Skip to content

Commit 1a02e5f

Browse files
committed
apply suggestions by code-review
1 parent 677b915 commit 1a02e5f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

v2/http.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
"github.com/sirupsen/logrus"
2929
goahttp "goa.design/goa/v3/http"
3030
"goa.design/goa/v3/http/middleware"
31+
goamiddleware "goa.design/goa/v3/middleware"
3132
)
3233

3334
// Server is the actual server
@@ -70,7 +71,7 @@ func Server(home string) http.Handler {
7071
// to correlate.
7172
func errorHandler(logger *logrus.Logger) func(context.Context, http.ResponseWriter, error) {
7273
return func(ctx context.Context, w http.ResponseWriter, err error) {
73-
id := ctx.Value(middleware.RequestID).(string)
74+
id := ctx.Value(goamiddleware.RequestIDKey).(string)
7475
w.Write([]byte("[" + id + "] encoding: " + err.Error()))
7576
logger.Printf("[%s] ERROR: %s", id, err.Error())
7677
}

0 commit comments

Comments
 (0)