From 66528cd9d90664c096d21633b095add84eacd260 Mon Sep 17 00:00:00 2001 From: seditionist <84986004+seditionist@users.noreply.github.com> Date: Sun, 26 Nov 2023 17:42:55 -0500 Subject: [PATCH] Restore error message constants --- src/utils/constants.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 176a46a..d7b0751 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -280,11 +280,15 @@ export const FORMATTED_SOUL_WARS = 'Soul Wars Zeal'; export const FORMATTED_LEAGUE_POINTS = 'League Points'; export const FORMATTED_RIFTS_CLOSED = 'Rifts closed'; +export const INVALID_FORMAT_ERROR = 'Invalid hiscores format'; +export const PLAYER_NOT_FOUND_ERROR = 'Player not found'; +export const HISCORES_ERROR = 'HiScores not responding'; + export class InvalidFormatError extends Error { __proto__ = Error; constructor() { - super('Invalid hiscores format'); + super(INVALID_FORMAT_ERROR); Object.setPrototypeOf(this, InvalidFormatError.prototype); } } @@ -302,7 +306,7 @@ export class PlayerNotFoundError extends Error { __proto__ = Error; constructor() { - super('Player not found'); + super(PLAYER_NOT_FOUND_ERROR); Object.setPrototypeOf(this, PlayerNotFoundError.prototype); } } @@ -311,7 +315,7 @@ export class HiScoresError extends Error { __proto__ = Error; constructor() { - super('HiScores not responding'); + super(HISCORES_ERROR); Object.setPrototypeOf(this, HiScoresError.prototype); } -} +} \ No newline at end of file