服务器返回的错误信息为:Http400,解决办法:
if (throwable instanceof HttpException) {
try {
ResponseBody body = ((HttpException) throwable).response().errorBody();
Gson gson = new Gson();
String res = body.string();
BaseEntity entity = gson.fromJson(res, BaseEntity.class);
ToastUtil.showToast(new String(entity.getMsg()));
} catch (Exception e) {
e.printStackTrace();
}
}
}