diff --git a/qerr/quic_error.go b/qerr/quic_error.go index d0a313827..6259476b8 100644 --- a/qerr/quic_error.go +++ b/qerr/quic_error.go @@ -40,6 +40,6 @@ func ToQuicError(err error) *QuicError { case ErrorCode: return Error(e, "") } - utils.Errorf("BUG: Unknown error encountered: %#v", err) - return Error(InternalError, "") + utils.Errorf("Internal error: %v", err) + return Error(InternalError, err.Error()) } diff --git a/qerr/quic_error_test.go b/qerr/quic_error_test.go index f576d8367..922a66a6b 100644 --- a/qerr/quic_error_test.go +++ b/qerr/quic_error_test.go @@ -36,7 +36,7 @@ var _ = Describe("Quic error", func() { }) It("changes default errors to InternalError", func() { - Expect(qerr.ToQuicError(io.EOF)).To(Equal(qerr.Error(qerr.InternalError, ""))) + Expect(qerr.ToQuicError(io.EOF)).To(Equal(qerr.Error(qerr.InternalError, "EOF"))) }) }) })