Fix error handling in acceleration data polling

This commit is contained in:
Mononaut
2024-01-31 18:38:56 +00:00
parent 788a8693ee
commit 0bf0d79ee4
6 changed files with 20 additions and 18 deletions

View File

@@ -142,7 +142,7 @@ class Mining {
public async $getPoolStat(slug: string): Promise<object> {
const pool = await PoolsRepository.$getPool(slug);
if (!pool) {
throw new Error('This mining pool does not exist ' + escape(slug));
throw new Error('This mining pool does not exist');
}
const blockCount: number = await BlocksRepository.$blockCount(pool.id);