diff --git a/src/UI/UIWindowLogin.js b/src/UI/UIWindowLogin.js index 69386350..6cbb9733 100644 --- a/src/UI/UIWindowLogin.js +++ b/src/UI/UIWindowLogin.js @@ -162,7 +162,30 @@ async function UIWindowLogin(options){ $(el_window).close(); }, error: function (err){ - $(el_window).find('.login-error-msg').html(err.responseText); + const $errorMessage = $(el_window).find('.login-error-msg'); + if (err.status === 404) { + // Don't include the whole 404 page + $errorMessage.html(`Error 404: "${gui_origin}/login" not found`); + } else if (err.responseText) { + $errorMessage.html(err.responseText); + } else { + // No message was returned. *Probably* this means we couldn't reach the server. + // If this is a self-hosted instance, it's probably a configuration issue. + if (app_domain !== 'puter.com') { + $errorMessage.html(`
Error reaching "${gui_origin}/login". This is likely to be a configuration issue.
+Make sure of the following:
+domain
in config.json is set to the domain you're using to access puterapi.
subdomain on that domainhttp_port
is set to the port Puter is listening on (auto
will use 4100
unless that port is in use)pub_port
is set to the external port (ex: 443
if you're using a reverse proxy that serves over https)