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
Fetch errors do not result in a promise rejection #23
Comments
Note: the above likely should not yield any errors ever, in whatever way.
|
Comunica is probably the root cause of this problem, see comunica/comunica#381 |
Root cause is apparently LDflex/LDflex-Comunica#13. @jaxoncreed Could you check how the above works for you with the proposed fix there? |
After quick testing with the original code:
So that discrepancy is also a problem. |
After LDflex/LDflex-Comunica#13, also two different behaviors:
Especially the second thing is a problem. If Chrome does not return anything to us on failure, we'd need to resolve to a timeout. |
I just tested the example above in Chrome 72.0.3626.121, and However, when I test with an unknown domain, no error is caught at all, but the promise rejects, and only the very first time: @RubenVerborgh Are you aware of any caching going on in LDflex? |
Has there been any update on this? I've been getting it on Firefox and Chrome for 403 errors. |
The same problem is also present in Node, where the following code stops: const ruben = data['https://ruben.verborgh.org/profile/#me'];
showPerson(ruben)
async function showPerson(person) {
console.log(`This person is ${await person.label}`);
console.log(`${await person.givenName} is friends with:`);
for await (const myFriend of person.friends) {
console.log(`- ${myFriend}`);
for await (const otherFriend of data[`${myFriend}`].friends)
console.log(` - ${otherFriend}`);
}
} The error is
|
In #30, we are unsure whether this issue was fully fixed. Might need reproducible test cases for browsers. |
See mention there, this bug still seems to be affecting the Solid SDK? |
Indeed; tracking this in #30. |
When doing an asynchronous request, try/catch statements should properly catch errors, but they do not.
Example:
When running this code via a web-browswer on localhost, Tim's pod disallows requests coming from the unregistered localhost app. This is all fine, but the resulting error it triggers cannot be caught.
This yields
Uncaught (in promise) TypeError: Failed to fetch
The same result will happen if I try to retrieve an improperly formatted ttl file
The text was updated successfully, but these errors were encountered: