From 532d88ed4c37fc748902fef6d31f9fa83f265a78 Mon Sep 17 00:00:00 2001 From: rootdarkarchon Date: Sat, 23 Dec 2023 14:31:02 +0100 Subject: [PATCH] better message on unauthorized --- MareSynchronos/WebAPI/SignalR/TokenProvider.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MareSynchronos/WebAPI/SignalR/TokenProvider.cs b/MareSynchronos/WebAPI/SignalR/TokenProvider.cs index d75673f..7b0cc60 100644 --- a/MareSynchronos/WebAPI/SignalR/TokenProvider.cs +++ b/MareSynchronos/WebAPI/SignalR/TokenProvider.cs @@ -97,7 +97,11 @@ public sealed class TokenProvider : IDisposable, IMediatorSubscriber if (ex.StatusCode == System.Net.HttpStatusCode.Unauthorized) { - Mediator.Publish(new NotificationMessage("Error refreshing token", "Your authentication token could not be renewed. Try reconnecting to Mare manually.", + if (isRenewal) + Mediator.Publish(new NotificationMessage("Error refreshing token", "Your authentication token could not be renewed. Try reconnecting to Mare manually.", + Dalamud.Interface.Internal.Notifications.NotificationType.Error)); + else + Mediator.Publish(new NotificationMessage("Error generating token", "Your authentication token could not be generated. Check Mares main UI to see the error message.", Dalamud.Interface.Internal.Notifications.NotificationType.Error)); Mediator.Publish(new DisconnectedMessage()); throw new MareAuthFailureException(response);