diff --git a/pkg/liberrors/server.go b/pkg/liberrors/server.go index a82f8f53..39e2e5c1 100644 --- a/pkg/liberrors/server.go +++ b/pkg/liberrors/server.go @@ -71,7 +71,7 @@ type ErrServerUnhandledRequest struct { // Error implements the error interface. func (e ErrServerUnhandledRequest) Error() string { - return fmt.Sprintf("unhandled request (%v %v)", e.Req.Method, e.Req.URL) + return fmt.Sprintf("unhandled request: %v %v", e.Req.Method, e.Req.URL) } // ErrServerInvalidState is an error that can be returned by a server. diff --git a/server_test.go b/server_test.go index 62abca10..f6524cb5 100644 --- a/server_test.go +++ b/server_test.go @@ -659,7 +659,7 @@ func TestServerErrorInvalidMethod(t *testing.T) { s := &Server{ Handler: &testServerHandler{ onConnClose: func(ctx *ServerHandlerOnConnCloseCtx) { - require.EqualError(t, ctx.Error, "unhandled request (INVALID rtsp://localhost:8554/)") + require.EqualError(t, ctx.Error, "unhandled request: INVALID rtsp://localhost:8554/") close(connClosed) }, },