光环助手V3.2 DEV(20180415-1700)测试问题汇总
http://gitlab.ghzhushou.com/pm/halo-app-issues/issues/207
This commit is contained in:
@ -153,21 +153,15 @@ public class LoginUtils {
|
||||
if (exception.code() == 403) {
|
||||
try {
|
||||
JSONObject errorJson = new JSONObject(exception.response().errorBody().string());
|
||||
String detail = errorJson.getString("detail");
|
||||
switch (detail) {
|
||||
case "too frequent":
|
||||
Utils.toast(context, R.string.comment_failed_toofrequent);
|
||||
break;
|
||||
case "user blocked":
|
||||
int errorCode = errorJson.getInt("code");
|
||||
switch (errorCode) {
|
||||
case 403019:
|
||||
Utils.toast(context, R.string.comment_failed_userblocked);
|
||||
break;
|
||||
case "user banned":
|
||||
Utils.toast(context, R.string.comment_failed_userbanned);
|
||||
case 403020:
|
||||
Utils.toast(context, R.string.comment_failed_toofrequent);
|
||||
break;
|
||||
case "article blocked":
|
||||
Utils.toast(context, R.string.comment_failed_articleblocked);
|
||||
break;
|
||||
case "illegal":
|
||||
case 403021:
|
||||
Utils.toast(context, R.string.comment_failed_illegal);
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user