1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 14:02:55 +08:00

Add logging on comment post failure

This commit is contained in:
Bartłomiej Dach 2023-01-17 21:30:46 +01:00
parent 1480c691ae
commit 3640342805
No known key found for this signature in database

View File

@ -19,6 +19,7 @@ using osu.Framework.Threading;
using System.Collections.Generic;
using JetBrains.Annotations;
using osu.Framework.Localisation;
using osu.Framework.Logging;
using osu.Game.Graphics.Sprites;
using osu.Game.Resources.Localisation.Web;
using osu.Game.Users.Drawables;
@ -420,9 +421,10 @@ namespace osu.Game.Overlays.Comments
{
ShowLoadingSpinner = true;
CommentPostRequest req = new CommentPostRequest(commentsContainer.Type.Value, commentsContainer.Id.Value, text);
req.Failure += _ => Schedule(() =>
req.Failure += e => Schedule(() =>
{
ShowLoadingSpinner = false;
Logger.Error(e, "Posting comment failed.");
});
req.Success += cb => Schedule(() =>
{