Skip to content

Commit ea81430

Browse files
Merge pull request #159 from Sebastian-Webster/158-show-received-value-on-incorrect-option-value-error
Show received value on incorrect option value error
2 parents 1015386 + 02c632f commit ea81430

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)