mirror of
https://github.com/Xevion/rdap.git
synced 2025-12-08 12:08:11 -06:00
Provide data context to null target detection error message
This commit is contained in:
@@ -163,7 +163,11 @@ const useLookup = (warningHandler?: WarningHandler) => {
|
|||||||
return await getAndParse<AutonomousNumber>(url, AutonomousNumberSchema);
|
return await getAndParse<AutonomousNumber>(url, AutonomousNumberSchema);
|
||||||
}
|
}
|
||||||
case null:
|
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 "url":
|
||||||
case "tld":
|
case "tld":
|
||||||
case "registrar":
|
case "registrar":
|
||||||
|
|||||||
Reference in New Issue
Block a user