Skip to content

Commit 02c632f

Browse files
Show received value on incorrect option value error
1 parent 09ca65b commit 02c632f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export async function createDB(opts?: ServerOptions) {
2727

2828
if (!OPTION_TYPE_CHECKS[opt].check(suppliedOpts[opt])) {
2929
//Supplied option failed the check
30-
throw OPTION_TYPE_CHECKS[opt].errorMessage
30+
throw `${OPTION_TYPE_CHECKS[opt].errorMessage} | Received value: ${suppliedOpts[opt]} (type: ${typeof suppliedOpts[opt]})`
3131
}
3232

3333
if (suppliedOpts[opt] !== undefined) {

0 commit comments

Comments
 (0)