Skip to content

Commit f9303aa

Browse files
committed
Fix panic messages in Flush()
1 parent 98ca08e commit f9303aa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

response.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package echo
55

66
import (
77
"bufio"
8+
"fmt"
89
"errors"
910
"net"
1011
"net/http"
@@ -88,7 +89,7 @@ func (r *Response) Write(b []byte) (n int, err error) {
8889
func (r *Response) Flush() {
8990
err := http.NewResponseController(r.Writer).Flush()
9091
if err != nil && errors.Is(err, http.ErrNotSupported) {
91-
panic(errors.New("response writer flushing is not supported"))
92+
panic(fmt.Errorf("echo: response writer %T does not support flushing (http.Flusher interface)", r.Writer))
9293
}
9394
}
9495

0 commit comments

Comments
 (0)