File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
rust/operator-binary/src/crd Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,9 @@ pub enum Error {
107107
108108 #[ snafu( display( "role-group is not valid" ) ) ]
109109 NoRoleGroup ,
110+
111+ #[ snafu( display( "role-group not found by name" ) ) ]
112+ RoleGroupNotFound ,
110113}
111114
112115#[ versioned( version( name = "v1alpha1" ) ) ]
@@ -225,9 +228,7 @@ impl v1alpha1::HbaseCluster {
225228 . role_groups
226229 . get ( role_group)
227230 . map ( |rg| rg. config . config . clone ( ) )
228- . expect (
229- "Cannot be empty as trivial values of role-group have already been checked" ,
230- ) ;
231+ . context ( RoleGroupNotFoundSnafu ) ?;
231232
232233 (
233234 AnyConfigFragment :: RegionServer ( role_config) ,
@@ -249,9 +250,7 @@ impl v1alpha1::HbaseCluster {
249250 . role_groups
250251 . get ( role_group)
251252 . map ( |rg| rg. config . config . clone ( ) )
252- . expect (
253- "Cannot be empty as trivial values of role-group have already been checked" ,
254- ) ;
253+ . context ( RoleGroupNotFoundSnafu ) ?;
255254
256255 // Retrieve role resource config
257256 (
@@ -271,9 +270,7 @@ impl v1alpha1::HbaseCluster {
271270 . role_groups
272271 . get ( role_group)
273272 . map ( |rg| rg. config . config . clone ( ) )
274- . expect (
275- "Cannot be empty as trivial values of role-group have already been checked" ,
276- ) ;
273+ . context ( RoleGroupNotFoundSnafu ) ?;
277274
278275 // Retrieve role resource config
279276 (
You can’t perform that action at this time.
0 commit comments