Browse Source

frame: add missing error codes to parse

Chris Bannister 9 năm trước cách đây
mục cha
commit
ac50672c8c
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      frame.go

+ 4 - 0
frame.go

@@ -573,6 +573,10 @@ func (f *framer) parseErrorFrame() frame {
 		res.Function = f.readString()
 		res.ArgTypes = f.readStringList()
 		return res
+	case errInvalid, errBootstrapping, errConfig, errCredentials, errOverloaded,
+		errProtocol, errServer, errSyntax, errTruncate, errUnauthorized:
+		// TODO(zariel): we should have some distinct types for these errors
+		return errD
 	default:
 		panic(fmt.Errorf("unknown error code: 0x%x", errD.code))
 	}