mirror of
https://github.com/Xevion/rdap.git
synced 2025-12-06 15:16:07 -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);
|
||||
}
|
||||
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":
|
||||
|
||||
Reference in New Issue
Block a user