Skip to content

Commit ca555e7

Browse files
authored
refactor(index): throw typeerror if checking type (#499)
Signed-off-by: Frazer Smith <frazer.dev@icloud.com>
1 parent 997a6db commit ca555e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ function checkRootPathForErrors (fastify, rootPath) {
443443

444444
function checkPath (fastify, rootPath) {
445445
if (typeof rootPath !== 'string') {
446-
throw new Error('"root" option must be a string')
446+
throw new TypeError('"root" option must be a string')
447447
}
448448
if (path.isAbsolute(rootPath) === false) {
449449
throw new Error('"root" option must be an absolute path')

0 commit comments

Comments
 (0)