1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 02:43:19 +08:00

change error message based on exception message

This commit is contained in:
Davran Dilshat 2021-09-11 14:18:09 +01:00
parent acb181ff2b
commit c166f1a06a

View File

@ -277,7 +277,9 @@ namespace osu.Game.Online.Chat
var request = new GetUserRequest(content);
request.Success += OpenPrivateChannel;
request.Failure += _ => target.AddNewMessages(new ErrorMessage($"User '{content}' was not found."));
request.Failure += e => target.AddNewMessages(
new ErrorMessage(e.InnerException?.Message == "NotFound" ? $"User '{content}' was not found." : "Could not fetch user."));
api.Queue(request);
break;