Skip to content

Commit

Permalink
SID取得エラーへの対応
Browse files Browse the repository at this point in the history
  • Loading branch information
onihusube committed Apr 10, 2022
1 parent e907271 commit f4e1237
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions APIMediator/APIAccess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,24 @@ public void UpdateSID()
using (StreamReader Res = new StreamReader(wres.GetResponseStream()))
{
String ResData = Res.ReadToEnd();
//
this.SessionID = ResData.Split(':')[1];
if (ResData.Contains("ERROR:") == true || this.SessionID == "")

System.Diagnostics.Debug.WriteLine(ResData);

if (ResData.StartsWith("ng"))
{
CurrentError = $"SessionIDの取得に失敗しました。\n{ResData}";
//ViewModel.OnModelNotice("SessionIDの取得に失敗しました。\n" + ResData, true);
this.SessionID = DefaultSID;
}
else
{
this.SessionID = ResData.Split(':')[1];
if (ResData.Contains("ERROR:") == true || this.SessionID == "")
{
CurrentError = $"SessionIDの取得に失敗しました。\n{ResData}";
//ViewModel.OnModelNotice("SessionIDの取得に失敗しました。\n" + ResData, true);
this.SessionID = DefaultSID;
}
}
}
wres?.Close();
}
Expand Down

0 comments on commit f4e1237

Please sign in to comment.