diff options
Diffstat (limited to 'error.go')
-rw-r--r-- | error.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3,11 +3,11 @@ package mux import ( "context" "encoding/json" - "io" + "net/http" ) var DefaultErrorHandler func(err error) Renderer = func(err error) Renderer { - return RendererFunc(func(ctx context.Context, w io.Writer) error { + return RendererFunc(func(ctx context.Context, w http.ResponseWriter) error { return json.NewEncoder(w).Encode(errorStruct{ Message: err.Error(), }) |