@@ -35,7 +35,7 @@ export const checkOnline = async (candidate: any): Promise<boolean> => {
3535 return true ;
3636 } catch ( e ) {
3737 logger . error ( `Error checking online status: ${ e } ` , constraintsLabel ) ;
38- return false ;
38+ throw new Error ( "could not make validity check" ) ;
3939 }
4040} ;
4141
@@ -59,7 +59,7 @@ export const checkValidateIntention = async (
5959 return false ;
6060 } catch ( e ) {
6161 logger . error ( `Error checking validate intention: ${ e } ` , constraintsLabel ) ;
62- return false ;
62+ throw new Error ( "could not make validity check" ) ;
6363 }
6464} ;
6565
@@ -81,7 +81,7 @@ export const checkAllValidateIntentions = async (
8181 return true ;
8282 } catch ( e ) {
8383 logger . error ( `Error checking validate intentions: ${ e } ` , constraintsLabel ) ;
84- return false ;
84+ throw new Error ( "could not make validity check" ) ;
8585 }
8686} ;
8787
@@ -172,7 +172,7 @@ export const checkLatestClientVersion = async (
172172 constraintsLabel ,
173173 ) ;
174174 await setLatestClientReleaseValidity ( candidate . stash , false ) ;
175- return false ;
175+ throw new Error ( "could not make validity check" ) ;
176176 }
177177} ;
178178
@@ -196,7 +196,7 @@ export const checkConnectionTime = async (
196196 }
197197 } catch ( e ) {
198198 logger . error ( `Error checking connection time: ${ e } ` , constraintsLabel ) ;
199- return false ;
199+ throw new Error ( "could not make validity check" ) ;
200200 }
201201} ;
202202
@@ -222,7 +222,7 @@ export const checkIdentity = async (
222222 return true ;
223223 } catch ( e ) {
224224 logger . error ( `Error checking identity: ${ e } ` , constraintsLabel ) ;
225- return false ;
225+ throw new Error ( "could not make validity check" ) ;
226226 }
227227} ;
228228
@@ -239,7 +239,7 @@ export const checkOffline = async (candidate: Candidate): Promise<boolean> => {
239239 return true ;
240240 } catch ( e ) {
241241 logger . error ( `Error checking offline: ${ e } ` , constraintsLabel ) ;
242- return false ;
242+ throw new Error ( "could not make validity check" ) ;
243243 }
244244} ;
245245export const checkCommission = async (
@@ -267,7 +267,7 @@ export const checkCommission = async (
267267 }
268268 } catch ( e ) {
269269 logger . error ( `Error checking commission: ${ e } ` , constraintsLabel ) ;
270- return false ;
270+ throw new Error ( "could not make validity check" ) ;
271271 }
272272} ;
273273
@@ -301,7 +301,7 @@ export const checkSelfStake = async (
301301 return true ;
302302 } catch ( e ) {
303303 logger . error ( `Error checking self stake: ${ e } ` , constraintsLabel ) ;
304- return false ;
304+ throw new Error ( "could not make validity check" ) ;
305305 }
306306} ;
307307
@@ -329,7 +329,7 @@ export const checkUnclaimed = async (
329329 }
330330 } catch ( e ) {
331331 logger . error ( `Error checking unclaimed: ${ e } ` , constraintsLabel ) ;
332- return false ;
332+ throw new Error ( "could not make validity check" ) ;
333333 }
334334} ;
335335
@@ -350,7 +350,7 @@ export const checkBlocked = async (
350350 }
351351 } catch ( e ) {
352352 logger . error ( `Error checking blocked: ${ e } ` , constraintsLabel ) ;
353- return false ;
353+ throw new Error ( "could not make validity check" ) ;
354354 }
355355} ;
356356
@@ -386,7 +386,7 @@ export const checkProvider = async (
386386 }
387387 } catch ( e ) {
388388 logger . error ( `Error checking provider: ${ e } ` , constraintsLabel ) ;
389- return false ;
389+ throw new Error ( "could not make validity check" ) ;
390390 }
391391} ;
392392
@@ -415,7 +415,7 @@ export const checkKusamaRank = async (
415415 return true ;
416416 } catch ( e ) {
417417 logger . warn ( `Error trying to get kusama data...` ) ;
418- return true ;
418+ throw new Error ( "could not make validity check" ) ;
419419 }
420420} ;
421421
@@ -434,6 +434,6 @@ export const checkBeefyKeys = async (
434434 }
435435 } catch ( e ) {
436436 logger . warn ( `Error trying to get beefy keys...` , constraintsLabel ) ;
437- return false ;
437+ throw new Error ( "could not make validity check" ) ;
438438 }
439439} ;
0 commit comments