mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-18 17:15:40 -04:00
[MSA] Notify for user logged in with demo account
This commit is contained in:
parent
24d10d395c
commit
fdd7dc348b
@ -299,9 +299,17 @@ public class Msa {
|
||||
}
|
||||
|
||||
private static void throwResponseError(HttpURLConnection conn) throws IOException {
|
||||
String otherErrStr;
|
||||
String errStr = Tools.read(conn.getErrorStream());
|
||||
Log.i("MicroAuth","Error code: " + conn.getResponseCode() + ": " + conn.getResponseMessage() + "\n" + errStr);
|
||||
throw new RuntimeException("MSA Error: " + conn.getResponseCode() + ": " + conn.getResponseMessage() + ", error stream:\n" + errStr);
|
||||
|
||||
if (errStream.contains("NOT_FOUND") &&
|
||||
errStream.contains("The server has not found anything matching the request URI"))
|
||||
{
|
||||
otherErrStr = "Can't login a demo account!";
|
||||
}
|
||||
|
||||
throw new RuntimeException(otherErrStr + "\n\nMSA Error: " + conn.getResponseCode() + ": " + conn.getResponseMessage() + ", error stream:\n" + errStr);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user