@@ -38,33 +38,6 @@ pub enum Error {
38
38
#[ snafu( display( "Unknown proto column datatype: {}" , datatype) ) ]
39
39
UnknownColumnDataType { datatype : i32 , location : Location } ,
40
40
41
- // #[snafu(display("Failed to create column datatype from {:?}", from))]
42
- // IntoColumnDataType {
43
- // from: ConcreteDataType,
44
- // location: Location,
45
- // },
46
-
47
- // #[snafu(display(
48
- // "Failed to convert column default constraint, column: {}, source: {}",
49
- // column,
50
- // source
51
- // ))]
52
- // ConvertColumnDefaultConstraint {
53
- // column: String,
54
- // #[snafu(backtrace)]
55
- // source: datatypes::error::Error,
56
- // },
57
-
58
- // #[snafu(display(
59
- // "Invalid column default constraint, column: {}, source: {}",
60
- // column,
61
- // source
62
- // ))]
63
- // InvalidColumnDefaultConstraint {
64
- // column: String,
65
- // #[snafu(backtrace)]
66
- // source: datatypes::error::Error,
67
- // },
68
41
#[ snafu( display( "Illegal GRPC client state: {}" , err_msg) ) ]
69
42
IllegalGrpcClientState { err_msg : String , location : Location } ,
70
43
@@ -99,3 +72,15 @@ impl From<Status> for Error {
99
72
Self :: Server { status : e, msg }
100
73
}
101
74
}
75
+
76
+ impl Error {
77
+ /// Indicate if the error is retriable
78
+ pub fn is_retriable ( & self ) -> bool {
79
+ !matches ! (
80
+ self ,
81
+ Self :: InvalidTlsConfig { .. }
82
+ | Self :: MissingField { .. }
83
+ | Self :: InvalidConfigFilePath { .. }
84
+ )
85
+ }
86
+ }
0 commit comments