@@ -157,8 +157,7 @@ export class DailyLeaderboard {
157157 rank : minRank + index + 1 ,
158158 } ;
159159 } catch ( error ) {
160- throw new MonkeyError (
161- 500 ,
160+ throw new Error (
162161 `Failed to parse leaderboard entry at index ${ index } : ${
163162 error instanceof Error ? error . message : String ( error )
164163 } `
@@ -203,7 +202,7 @@ export class DailyLeaderboard {
203202 ) : Promise < LeaderboardEntry | null > {
204203 const connection = RedisClient . getConnection ( ) ;
205204 if ( ! connection || ! dailyLeaderboardsConfig . enabled ) {
206- throw new MonkeyError ( 500 , "Redis connection is unavailable" ) ;
205+ throw new Error ( "Redis connection is unavailable" ) ;
207206 }
208207
209208 const { leaderboardScoresKey, leaderboardResultsKey } =
@@ -235,8 +234,7 @@ export class DailyLeaderboard {
235234 rank : rank + 1 ,
236235 } ;
237236 } catch ( error ) {
238- throw new MonkeyError (
239- 500 ,
237+ throw new Error (
240238 `Failed to parse leaderboard entry: ${
241239 error instanceof Error ? error . message : String ( error )
242240 } `
@@ -247,7 +245,7 @@ export class DailyLeaderboard {
247245 public async getCount ( ) : Promise < number > {
248246 const connection = RedisClient . getConnection ( ) ;
249247 if ( ! connection ) {
250- throw new MonkeyError ( 500 , "Redis connection is unavailable" ) ;
248+ throw new Error ( "Redis connection is unavailable" ) ;
251249 }
252250
253251 const { leaderboardScoresKey } = this . getTodaysLeaderboardKeys ( ) ;
0 commit comments