显示纯文本错误提示
This commit is contained in:
1 parent
b0fc8f4c58
commit
fae86c1782
2 files changed
+187
-177
No files matched your search
@@ -224,7 +224,14 @@ public class HttpHelper {
|
||||
continue;
|
||||
|
||||
default:
|
||||
throw new ResponseCodeException(responseCode);
|
||||
String body;
|
||||
// Get pure text error
|
||||
if (rh instanceof GetStringHelper
|
||||
&& (body = (String)rh.onAfterConnect(conn)) != null
|
||||
&& !body.contains("<"))
|
||||
throw new Exception(body);
|
||||
else
|
||||
throw new ResponseCodeException(responseCode);
|
||||
}
|
||||
}
|
||||
throw new RedirectionException();
|
||||
|
||||
Reference in new issue
Block a user