mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-02-18 02:55:48 +00:00
Show better error message when WikiTree ID doesn't exist
This commit is contained in:
parent
f761eea8f1
commit
033a86a05a
@ -138,7 +138,7 @@ export async function loadWikiTree(
|
|||||||
|
|
||||||
// Fetch the ancestors of the input person and ancestors of his/her spouses.
|
// Fetch the ancestors of the input person and ancestors of his/her spouses.
|
||||||
const firstPerson = await getRelatives([key], handleCors);
|
const firstPerson = await getRelatives([key], handleCors);
|
||||||
if (!firstPerson[0].Name) {
|
if (!firstPerson[0]?.Name) {
|
||||||
const id = key;
|
const id = key;
|
||||||
throw new TopolaError(
|
throw new TopolaError(
|
||||||
'WIKITREE_PROFILE_NOT_ACCESSIBLE',
|
'WIKITREE_PROFILE_NOT_ACCESSIBLE',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user