Provide data context to null target detection error message

This commit is contained in:
2023-08-25 23:56:59 -05:00
parent 0554413195
commit 114f10193d

View File

@@ -163,7 +163,11 @@ const useLookup = (warningHandler?: WarningHandler) => {
return await getAndParse<AutonomousNumber>(url, AutonomousNumberSchema);
}
case null:
throw new Error("The type could not be detected given the target.");
throw new Error(
`The type could not be detected given the target (${JSON.stringify(
target
)}).`
);
case "url":
case "tld":
case "registrar":