"Install this theme component" doesn't display any information after a 502 error

I think it’s a fairly rare case, but still… :slight_smile:

Theme components often have this button to install the theme component on a remote Discourse:
image

Here, I entered discourse.canapin.com instead of discourse.canapin.dev. The first domain leads to a non-working IP, a remnant of past experiments. :slight_smile:

Then, there’s no error message. The “Install” button stays greyed out, and nothing happens:
image

After a while, https://meta.discourse.org/theme-install-checker.json obviously returns a 502 error, but it’s only visible in the network tab of the browser’s dev tools.

I’m not sure something should be done about this, but since I keep mixing up my domains, it led me to this situation a couple of times and I didn’t get what was wrong (because there was no error displayed).

Maybe a message should be displayed, whatever the error number is.

Maybe a loading icon should be added next to “Install” in the button if the operation takes more time than usual.

:slight_smile:

edit: I saw that there’s a cool loading icon on the fast edit button. Something like this would fit:

3 Likes

It also throws an error when we put an uppercase character in a URL:

image

I’m not 100% sure of URLs specs, but maybe the code should lowercase the string before triggering the script?