refactor: cleanup error type
[poolifier.git] / src / pools / selection-strategies / worker-choice-strategy-context.ts
index a3e3379c9ac461fc7cd16c2d32bb8735ca2d50ff..51de6e7b79a5cbc28812e41b772b298c86d400ed 100644 (file)
@@ -183,7 +183,7 @@ export class WorkerChoiceStrategyContext<
       this.choiceRetriesCount++
       return this.execute()
     } else if (workerNodeKey == null) {
-      throw new TypeError(
+      throw new Error(
         `Worker node key chosen is null or undefined after ${this.choiceRetriesCount} retries`
       )
     }