@@ -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
@@ -57,7 +57,7 @@ export const checkValidateIntention = async (
5757 return true ;
5858 } catch ( e ) {
5959 logger . error ( `Error checking validate intention: ${ e } ` , constraintsLabel ) ;
60- return false ;
60+ throw new Error ( "could not make validity check" ) ;
6161 }
6262} ;
6363
@@ -79,7 +79,7 @@ export const checkAllValidateIntentions = async (
7979 return true ;
8080 } catch ( e ) {
8181 logger . error ( `Error checking validate intentions: ${ e } ` , constraintsLabel ) ;
82- return false ;
82+ throw new Error ( "could not make validity check" ) ;
8383 }
8484} ;
8585
@@ -170,7 +170,7 @@ export const checkLatestClientVersion = async (
170170 constraintsLabel ,
171171 ) ;
172172 await setLatestClientReleaseValidity ( candidate . stash , false ) ;
173- return false ;
173+ throw new Error ( "could not make validity check" ) ;
174174 }
175175} ;
176176
@@ -194,7 +194,7 @@ export const checkConnectionTime = async (
194194 }
195195 } catch ( e ) {
196196 logger . error ( `Error checking connection time: ${ e } ` , constraintsLabel ) ;
197- return false ;
197+ throw new Error ( "could not make validity check" ) ;
198198 }
199199} ;
200200
@@ -220,7 +220,7 @@ export const checkIdentity = async (
220220 return true ;
221221 } catch ( e ) {
222222 logger . error ( `Error checking identity: ${ e } ` , constraintsLabel ) ;
223- return false ;
223+ throw new Error ( "could not make validity check" ) ;
224224 }
225225} ;
226226
@@ -237,7 +237,7 @@ export const checkOffline = async (candidate: Candidate): Promise<boolean> => {
237237 return true ;
238238 } catch ( e ) {
239239 logger . error ( `Error checking offline: ${ e } ` , constraintsLabel ) ;
240- return false ;
240+ throw new Error ( "could not make validity check" ) ;
241241 }
242242} ;
243243export const checkCommission = async (
@@ -265,7 +265,7 @@ export const checkCommission = async (
265265 }
266266 } catch ( e ) {
267267 logger . error ( `Error checking commission: ${ e } ` , constraintsLabel ) ;
268- return false ;
268+ throw new Error ( "could not make validity check" ) ;
269269 }
270270} ;
271271
@@ -299,7 +299,7 @@ export const checkSelfStake = async (
299299 return true ;
300300 } catch ( e ) {
301301 logger . error ( `Error checking self stake: ${ e } ` , constraintsLabel ) ;
302- return false ;
302+ throw new Error ( "could not make validity check" ) ;
303303 }
304304} ;
305305
@@ -327,7 +327,7 @@ export const checkUnclaimed = async (
327327 }
328328 } catch ( e ) {
329329 logger . error ( `Error checking unclaimed: ${ e } ` , constraintsLabel ) ;
330- return false ;
330+ throw new Error ( "could not make validity check" ) ;
331331 }
332332} ;
333333
@@ -348,7 +348,7 @@ export const checkBlocked = async (
348348 }
349349 } catch ( e ) {
350350 logger . error ( `Error checking blocked: ${ e } ` , constraintsLabel ) ;
351- return false ;
351+ throw new Error ( "could not make validity check" ) ;
352352 }
353353} ;
354354
@@ -384,7 +384,7 @@ export const checkProvider = async (
384384 }
385385 } catch ( e ) {
386386 logger . error ( `Error checking provider: ${ e } ` , constraintsLabel ) ;
387- return false ;
387+ throw new Error ( "could not make validity check" ) ;
388388 }
389389} ;
390390
@@ -413,7 +413,7 @@ export const checkKusamaRank = async (
413413 return true ;
414414 } catch ( e ) {
415415 logger . warn ( `Error trying to get kusama data...` ) ;
416- return true ;
416+ throw new Error ( "could not make validity check" ) ;
417417 }
418418} ;
419419
@@ -432,6 +432,6 @@ export const checkBeefyKeys = async (
432432 }
433433 } catch ( e ) {
434434 logger . warn ( `Error trying to get beefy keys...` , constraintsLabel ) ;
435- return false ;
435+ throw new Error ( "could not make validity check" ) ;
436436 }
437437} ;
0 commit comments