@@ -46,7 +46,7 @@ func Server(home string) http.Handler {
46
46
}
47
47
indexesEndpoints := indexessvc .NewEndpoints (& indexesSvc )
48
48
indexesServer := indexessvr .New (indexesEndpoints , mux , goahttp .RequestDecoder ,
49
- goahttp .ResponseEncoder , errorHandler (logger ))
49
+ goahttp .ResponseEncoder , errorHandler (logger ), nil )
50
50
indexessvr .Mount (mux , indexesServer )
51
51
52
52
// Mount tools
@@ -55,7 +55,7 @@ func Server(home string) http.Handler {
55
55
Indexes : & indexesSvc ,
56
56
}
57
57
toolsEndpoints := toolssvc .NewEndpoints (& toolsSvc )
58
- toolsServer := toolssvr .New (toolsEndpoints , mux , goahttp .RequestDecoder , goahttp .ResponseEncoder , errorHandler (logger ))
58
+ toolsServer := toolssvr .New (toolsEndpoints , mux , goahttp .RequestDecoder , goahttp .ResponseEncoder , errorHandler (logger ), nil )
59
59
toolssvr .Mount (mux , toolsServer )
60
60
61
61
// Mount middlewares
@@ -70,7 +70,7 @@ func Server(home string) http.Handler {
70
70
// to correlate.
71
71
func errorHandler (logger * logrus.Logger ) func (context.Context , http.ResponseWriter , error ) {
72
72
return func (ctx context.Context , w http.ResponseWriter , err error ) {
73
- id := ctx .Value (middleware .RequestIDKey ).(string )
73
+ id := ctx .Value (middleware .RequestID ).(string )
74
74
w .Write ([]byte ("[" + id + "] encoding: " + err .Error ()))
75
75
logger .Printf ("[%s] ERROR: %s" , id , err .Error ())
76
76
}
0 commit comments