-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught (in promise) Error: missing a title #86
Comments
As this library is completely without async / Promises the uncaught promise error is unrelated to this library. Using try catch and await is way easier to manage than your .then / .catch method chain. try {
const response = await fetch(url, {headers});
const { entities } = await response.json();
const simplified = wdk.simplify.entities(entities);
} catch {…} Would be interesting which Q id exactly caused this to debug this. |
Sorry, I do not understand. If I give |
Yes, the simplifyEntities method is from this library but this library does not use any promise. Therefore it can not produce an uncaught promise which means the uncaught promise must be created somewhere else in your code or another library you use. Personally I would rewrite your code with the await keyword and the try catch around it as I suspect a missing catch in there and it’s just way easier to read/understand. (Like the example in my last response) I hope I could rephrase my response well enough? |
Ok, the title of this issue is very misleading. It’s not at all about the uncaught promise. Can you specify which Item ID fails exactly? Also it looks like Deno is using a minified version without source map. So it’s not entirely clear where exactly it’s happening. |
redaktor is currently learning the planet earth including administrative or touristic hierarchies and connecting OSM relation, wikidata id, geonames etc.
When I looked for the following
[
"Q1844", "Q49651",
"Q49654", "Q49655",
"Q49657", "Q49659",
"Q49660", "Q49661",
"Q49662", "Q4540",
"Q49663", "Q27439086",
"Q27439070", "Q4191863",
"Q593158", "Q991615",
"Q27439073", "Q816776"
]
and used
getManyEntities
.thensimplify
[without options]then I got
error: Uncaught (in promise) Error: missing a title at Object.yr [as getSitelinkUrl] (https://esm.sh/v96/[email protected]/deno/wikibase-sdk.js:4:5206)
I see that it is coming from simplify (which I'll try/catch too as workaround) in my code
The text was updated successfully, but these errors were encountered: