fix: fix error type at public method arguments handling
authorJérôme Benoit <jerome.benoit@sap.com>
Tue, 15 Aug 2023 14:05:24 +0000 (16:05 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Tue, 15 Aug 2023 14:05:24 +0000 (16:05 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/pools/abstract-pool.ts

index 5b2bd15012142fa7e075fa8ea4968041ccfdd63a..4c08671e5d99ab362f4b0263a423cfe42b4af5e5 100644 (file)
@@ -670,7 +670,7 @@ export abstract class AbstractPool<
         typeof name === 'string' &&
         name.trim().length === 0
       ) {
-        reject(new Error('name argument must not be an empty string'))
+        reject(new TypeError('name argument must not be an empty string'))
       }
       if (name != null && !this.taskFunctions.includes(name)) {
         reject(