diff --git a/errors.go b/errors.go index 4fb372683..bafaab6ff 100644 --- a/errors.go +++ b/errors.go @@ -197,6 +197,10 @@ type RequestErrCASWriteUnknown struct { BlockFor int } +type UnknownServerError struct { + errorFrame +} + type OpType uint8 const ( diff --git a/frame.go b/frame.go index d7e6b8dc4..8d82d4b4f 100644 --- a/frame.go +++ b/frame.go @@ -723,7 +723,9 @@ func (f *framer) parseErrorFrame() frame { res.RejectedByCoordinator = f.readByte() != 0 return res } else { - panic(fmt.Errorf("unknown error code: 0x%x", errD.code)) + return &UnknownServerError{ + errorFrame: errD, + } } } }