-
Notifications
You must be signed in to change notification settings - Fork 341
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
Fix endpoint detection logic, broken on FetchError #608
Conversation
FetchError subclasses Error, but detecting it would be a pain
Spent 30+ minutes figuring out why this user was querying a project with a broken full address beginning with It turns out that the Are my deffensive programming instincts worth the time? At least in certain cases, these extra checks could be within reason. |
Not sure if this is solving the real issue. And of course nothing to be with the original case. The problem is that in CML.js we assume always |
This pull request just fixes a bug where every connection error gets masked under a barely meaningful
If you mean this Discord conversation, it would have been impossible to provide an accurate solution without the code from this pull request. 🤔
That's a good default, but some self-hosted users might still be relying on bare HTTP. It looks like you've identified another potential issue. |
I think thats the real issue of your user. All this pain could be solved checking http vs https since http wont even work either in any circumstance |
It looks like "my" user had a slightly more creative issue, where a plain HTTP server was listening on port 443 instead of 80.
|
c9b0060
to
fb9e082
Compare
Detecting errors other than the vanilla
Error
isn't especially easy nor reliable, or so it seems. Given that we only return errors and strings, it's easier to consider as an error everything that isn't a string.