Skip to content
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

Improve the error message when all configured hubs failed to connect. #189

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions SS14.Launcher/Assets/Locale/en-US/text.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ filters = Filters ({ $filteredServers } / { $totalServers })
tab-servers-search-watermark = Search For Servers…
tab-servers-table-players = Players
tab-servers-table-name = Server Name
tab-servers-list-status-error = There was an error fetching the master server lists.
tab-servers-list-status-partial-error = Failed to fetch some or all server lists. Ensure your hub configuration is correct.
tab-servers-list-status-error = There was an error fetching the master server lists. Maybe try refreshing?
tab-servers-list-status-partial-error = Failed to fetch some of the server lists. Ensure your hub configuration is correct and try refreshing.
tab-servers-list-status-updating-master = Fetching master server list…
tab-servers-list-status-none-filtered = No servers match your search or filter settings.
tab-servers-list-status-none = There are no public servers. Ensure your hub configuration is correct.
Expand Down
10 changes: 8 additions & 2 deletions SS14.Launcher/Models/ServerStatus/ServerListCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ public async void RefreshServerList(CancellationToken cancel)
else if (request.IsCanceled)
{
Log.Warning("Request to hub {HubAddress} failed: canceled", hub);

}

allSucceeded = false;
Expand Down Expand Up @@ -136,7 +135,14 @@ public async void RefreshServerList(CancellationToken cancel)
return statusData;
}));

Status = allSucceeded ? RefreshListStatus.Updated : RefreshListStatus.PartialError;
if (_allServers.Count == 0)
// We did not get any servers
Status = RefreshListStatus.Error;
else if (!allSucceeded)
// Some hubs succeeded and returned data
Status = RefreshListStatus.PartialError;
else
Status = RefreshListStatus.Updated;
}
catch (OperationCanceledException)
{
Expand Down
Loading