Skip to content

Commit

Permalink
should catch accesstoken now
Browse files Browse the repository at this point in the history
  • Loading branch information
NecronomiconCoding committed Jul 31, 2016
1 parent 1925832 commit 87ecdb0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions PoGo.NecroBot.Logic/State/LoginState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,19 @@ public async Task<IState> Execute(ISession session, CancellationToken cancellati
await Task.Delay(20000, cancellationToken);
return this;
}
catch (AccessTokenExpiredException)
{
session.EventDispatcher.Send(new ErrorEvent
{
Message = session.Translation.GetTranslation(TranslationString.PtcOffline) // use ptcoffline for now.
});
session.EventDispatcher.Send(new NoticeEvent
{
Message = session.Translation.GetTranslation(TranslationString.TryingAgainIn, 20)
});
await Task.Delay(20000, cancellationToken);
return this;
}
catch (AccountNotVerifiedException)
{
session.EventDispatcher.Send(new ErrorEvent
Expand Down

0 comments on commit 87ecdb0

Please sign in to comment.